rubocop-gradual 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad8fc07a5efc9411a388f7fd1eab366bacd44466ea7d268596b22d2c8a42522c
|
4
|
+
data.tar.gz: 618f6421cca7465ec6b3bfa08fd0a97eda8cf642c605ec8010a944f406d7b8bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14a9f2ae2e16a42171257db3d466eb99228e2a094c4e453725a3e07136f09a6d028bd080e158da47efbdbd012e57e8641ee259ff296df388f8515e3da14cbc23
|
7
|
+
data.tar.gz: f8c0d7a36a2f616893bbcdc681f775989b3b376ecdacc6383bdb8ca417fd08b82f06d9f19955b3c2decbb32d4f159fb2957f47b0a518ae22fb29f48e11fa4f4c
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning].
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.3.3] - 2023-10-18
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Throw an error when the `--check` option is used and file hash is outdated. ([@skryukov])
|
15
|
+
- Wrap RuboCop errors to make output more pleasant. ([@skryukov])
|
16
|
+
|
10
17
|
## [0.3.2] - 2023-10-10
|
11
18
|
|
12
19
|
### Fixed
|
@@ -92,7 +99,8 @@ RuboCop::Gradual::RakeTask.new
|
|
92
99
|
|
93
100
|
[@skryukov]: https://github.com/skryukov
|
94
101
|
|
95
|
-
[Unreleased]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.
|
102
|
+
[Unreleased]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.3...HEAD
|
103
|
+
[0.3.3]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.2...v0.3.3
|
96
104
|
[0.3.2]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.1...v0.3.2
|
97
105
|
[0.3.1]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.0...v0.3.1
|
98
106
|
[0.3.0]: https://github.com/skryukov/rubocop-gradual/compare/v0.2.0...v0.3.0
|
@@ -41,17 +41,18 @@ module RuboCop
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def diff_issues(diff, result_file, old_file)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
moved
|
52
|
-
|
53
|
-
|
54
|
-
|
44
|
+
fixed_or_moved = old_file.changed_issues(result_file)
|
45
|
+
new_or_moved = result_file.changed_issues(old_file)
|
46
|
+
moved, fixed = split_issues(fixed_or_moved, new_or_moved)
|
47
|
+
new = new_or_moved - moved
|
48
|
+
unchanged = result_file.issues - new - moved
|
49
|
+
|
50
|
+
if result_file.file_hash != old_file.file_hash && fixed.empty? && new.empty? && moved.empty?
|
51
|
+
moved = unchanged
|
52
|
+
unchanged = []
|
53
|
+
end
|
54
|
+
|
55
|
+
diff.add_issues(result_file.path, fixed: fixed, moved: moved, new: new, unchanged: unchanged)
|
55
56
|
end
|
56
57
|
|
57
58
|
def split_issues(fixed_or_moved_issues, new_or_moved_issues)
|
@@ -42,7 +42,7 @@ module RuboCop
|
|
42
42
|
code = ""
|
43
43
|
data.each_line.lazy.drop(line).each_with_index do |str, index|
|
44
44
|
from = index.zero? ? column : 0
|
45
|
-
length
|
45
|
+
length -= code.length unless index.zero?
|
46
46
|
code += str[from, length]
|
47
47
|
|
48
48
|
break if code.length >= length
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-gradual
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svyatoslav Kryukov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diff-lcs
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
version: '1.0'
|
95
95
|
description: Gradually improve your code with RuboCop.
|
96
96
|
email:
|
97
|
-
-
|
97
|
+
- me@skryukov.dev
|
98
98
|
executables:
|
99
99
|
- rubocop-gradual
|
100
100
|
extensions: []
|