rubocop-gradual 0.3.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -1
- data/lib/rubocop/gradual/commands/base.rb +3 -0
- data/lib/rubocop/gradual/process/calculate_diff.rb +12 -11
- data/lib/rubocop/gradual/results/file.rb +1 -1
- data/lib/rubocop/gradual/results/issue.rb +1 -1
- data/lib/rubocop/gradual/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03f450cd4cc7123b6c7bf7b393cab547f36ea8c38bff64ff5468a8d50e7590c8
|
4
|
+
data.tar.gz: 4abbd0ba12b43d4db80203315bbfc4d2cd9fc120e30d0659a32bcd62278b1087
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a1ebecba028f66d5b646bfe36c62e01ac5d45e9a31ffab5cb01b12ff90023333dbcd61c58dc427090e6f095e9ee658284c8bab714cacbcf0c52eabad8b9f75
|
7
|
+
data.tar.gz: 2a04f09d401e024597bc255cb9897f1b76fe62ac0b2395a665951b49f019e531273335564e8481791b480597278370924de474eca0a45dacf708a71fac8674da
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning].
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.3.4] - 2023-10-26
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Use JSON.dump instead of to_json for stable results encoding. ([@skryukov])
|
15
|
+
|
16
|
+
## [0.3.3] - 2023-10-18
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
- Throw an error when the `--check` option is used and file hash is outdated. ([@skryukov])
|
21
|
+
- Wrap RuboCop errors to make output more pleasant. ([@skryukov])
|
22
|
+
|
10
23
|
## [0.3.2] - 2023-10-10
|
11
24
|
|
12
25
|
### Fixed
|
@@ -92,7 +105,9 @@ RuboCop::Gradual::RakeTask.new
|
|
92
105
|
|
93
106
|
[@skryukov]: https://github.com/skryukov
|
94
107
|
|
95
|
-
[Unreleased]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.
|
108
|
+
[Unreleased]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.4...HEAD
|
109
|
+
[0.3.4]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.3...v0.3.4
|
110
|
+
[0.3.3]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.2...v0.3.3
|
96
111
|
[0.3.2]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.1...v0.3.2
|
97
112
|
[0.3.1]: https://github.com/skryukov/rubocop-gradual/compare/v0.3.0...v0.3.1
|
98
113
|
[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.4
|
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-26 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: []
|