rubocop-asjer 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/lib/rubocop/asjer/version.rb +1 -1
- data/lib/rubocop/cop/asjer/rails_class_order.rb +13 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fce3144090cd112f10269b07afe0ad4767c22504b5f836d39b0b0e0dcb8aa19f
|
|
4
|
+
data.tar.gz: cb5b00b095467921f8bf67fd6fb164d818cab82d7ab16b74b60e5f2243ace66f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b66f0965a6e22d55c9f0cc6a7b7360bc4d2476d765aba303141a16d131e1f6fee037fccb9984e6bb6950ba412261e90ab5673ac5cbb589279a1184f4c57a3e9a
|
|
7
|
+
data.tar.gz: 40017018dd2d295869f733c722e6999cecfb6afdf6bcbb4272066f87d1345723471717c5934d57b3b1011b7566cb6c5d5ea1080b4b8a17ac7bae934c7f2870d8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.4](https://github.com/asjer/rubocop-asjer/compare/v0.4.3...v0.4.4) (2026-02-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* prevent excessive blank lines after autocorrect in `RailsClassOrder` cop ([56f6def](https://github.com/asjer/rubocop-asjer/commit/56f6deff1fab470ea5c7deac175d1d0088cd11f5))
|
|
9
|
+
|
|
3
10
|
## [0.4.3](https://github.com/asjer/rubocop-asjer/compare/v0.4.2...v0.4.3) (2026-01-28)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -129,7 +129,19 @@ module RuboCop
|
|
|
129
129
|
source = processed_source.buffer.source
|
|
130
130
|
line_start = source.rindex("\n", range.begin_pos - 1)&.+(1) || 0
|
|
131
131
|
end_pos = source[range.end_pos] == "\n" ? range.end_pos + 1 : range.end_pos
|
|
132
|
-
|
|
132
|
+
|
|
133
|
+
range_between(line_start, skip_trailing_blank_lines(source, end_pos))
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def skip_trailing_blank_lines(source, pos)
|
|
137
|
+
while pos < source.length
|
|
138
|
+
line_end = source.index("\n", pos)
|
|
139
|
+
break unless line_end
|
|
140
|
+
break unless source[pos...line_end].strip.empty?
|
|
141
|
+
|
|
142
|
+
pos = line_end + 1
|
|
143
|
+
end
|
|
144
|
+
pos
|
|
133
145
|
end
|
|
134
146
|
|
|
135
147
|
def build_sorted_source(sorted, original)
|