rubocop_todo_corrector 0.1.0 → 0.1.1
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: 1b3400e2c32ebba2820631095ea0a4468f81145edd4328472b13901f40fa1909
|
4
|
+
data.tar.gz: b6922a0b1da93adec490cabd5a59870d0412f2ef7bbd412173ca093b42e8f363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fe20782d6f29b60c55f6f0478345029fa73df46515e9d117aa640969c2683a684977943a2c63bbcf08b57be3e05531e468bd08837683e3139328f95f9db2643
|
7
|
+
data.tar.gz: de6bd6fd3f51f3004ad8f1e83c470ca630a71d0bf8489a6469bd49471fdfac649f898b477a058e78fed84a2a445af8be190a9396d7a7091eca19c9c2a834cbc1
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,17 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
-
## 0.1.
|
5
|
+
## 0.1.1 - 2022-05-15
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- Abort if no cop was picked on `pick` command.
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
- Fix bug that `pick` cannot find any cop on rubocop >= 1.26.
|
14
|
+
|
15
|
+
## 0.1.0 - 2022-05-15
|
6
16
|
|
7
17
|
### Added
|
8
18
|
|
data/Gemfile.lock
CHANGED
@@ -30,7 +30,11 @@ module RubocopTodoCorrector
|
|
30
30
|
def call
|
31
31
|
check_rubocop_todo_existence
|
32
32
|
cop_name = picked_cop&.[](:name)
|
33
|
-
|
33
|
+
if cop_name
|
34
|
+
::Kernel.puts(cop_name)
|
35
|
+
else
|
36
|
+
::Kernel.abort('No cop was picked.')
|
37
|
+
end
|
34
38
|
end
|
35
39
|
|
36
40
|
private
|
@@ -28,9 +28,9 @@ module RubocopTodoCorrector
|
|
28
28
|
|
29
29
|
# @return [Boolean]
|
30
30
|
def auto_correctable?
|
31
|
-
@content.include?('# Cop supports --auto-correct
|
32
|
-
@content.include?('#
|
33
|
-
@content.include?('#
|
31
|
+
@content.include?('# Cop supports --auto-correct') ||
|
32
|
+
@content.include?('# This cop supports safe auto-correction') ||
|
33
|
+
@content.include?('# This cop supports unsafe auto-correction')
|
34
34
|
end
|
35
35
|
|
36
36
|
# @return [String, nil]
|