rubocop_challenger 2.9.0 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +8 -3
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +35 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +59 -54
- data/README.md +22 -21
- data/challenger.gemspec +3 -12
- data/lib/rubocop_challenger/bundler/command.rb +4 -1
- data/lib/rubocop_challenger/cli.rb +5 -0
- data/lib/rubocop_challenger/go.rb +3 -2
- data/lib/rubocop_challenger/rubocop/command.rb +3 -1
- data/lib/rubocop_challenger/rubocop/yardoc.rb +5 -5
- data/lib/rubocop_challenger/version.rb +1 -1
- data/lib/rubocop_challenger.rb +1 -1
- metadata +8 -134
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d7441edd6ad94af1986092269c6bfa5e88301d2a394e2afe22fdffa769f13f
|
4
|
+
data.tar.gz: 4b1e41dad793b69a1de7269e0ddf57e829833d2e8aa183084bb1c6d5dab3ef9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa8b435983aed3fe1dfaca1c44104075ff3a7cdb32438328faeb922b63284c667216ee1db4b4f87672dad07af9a9ad0f497a6d331f4916192e435ce7bc8f2cbc
|
7
|
+
data.tar.gz: 5c2554befa82ac34cfd83486febc91a933b4c3608cc1ce1ed3c9ee0b80e8ceb982cbde456ad047034d05e331a13c99d811d9d9bcf465380e2b65d2a3bfefd862
|
data/.circleci/config.yml
CHANGED
@@ -12,8 +12,8 @@ references:
|
|
12
12
|
- &ruby_version
|
13
13
|
ruby_version:
|
14
14
|
type: enum
|
15
|
-
enum: ["2.7", "3.0", "3.1"]
|
16
|
-
default: "3.
|
15
|
+
enum: ["2.7", "3.0", "3.1", "3.2"]
|
16
|
+
default: "3.2"
|
17
17
|
|
18
18
|
executors:
|
19
19
|
default:
|
@@ -160,7 +160,7 @@ jobs:
|
|
160
160
|
- code-climate/install
|
161
161
|
- code-climate/sum-coverage:
|
162
162
|
input: codeclimate.*.json
|
163
|
-
parts:
|
163
|
+
parts: 4
|
164
164
|
- code-climate/upload-coverage
|
165
165
|
rubocop:
|
166
166
|
executor: default
|
@@ -202,6 +202,9 @@ workflows:
|
|
202
202
|
- build:
|
203
203
|
name: build_on_ruby_3.1
|
204
204
|
ruby_version: "3.1"
|
205
|
+
- build:
|
206
|
+
name: build_on_ruby_3.2
|
207
|
+
ruby_version: "3.2"
|
205
208
|
- rubocop
|
206
209
|
- yardoc
|
207
210
|
- integration_testing
|
@@ -210,12 +213,14 @@ workflows:
|
|
210
213
|
- build_on_ruby_2.7
|
211
214
|
- build_on_ruby_3.0
|
212
215
|
- build_on_ruby_3.1
|
216
|
+
- build_on_ruby_3.2
|
213
217
|
- release:
|
214
218
|
context: RubyGems API Key
|
215
219
|
requires:
|
216
220
|
- build_on_ruby_2.7
|
217
221
|
- build_on_ruby_3.0
|
218
222
|
- build_on_ruby_3.1
|
223
|
+
- build_on_ruby_3.2
|
219
224
|
- rubocop
|
220
225
|
filters:
|
221
226
|
branches:
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config --exclude-limit 30 --no-auto-gen-timestamp`
|
3
|
-
# using RuboCop version 1.
|
3
|
+
# using RuboCop version 1.45.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,40 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## v2.11.0 (Feb 15, 2023)
|
4
|
+
|
5
|
+
### Feature
|
6
|
+
|
7
|
+
- [#694](https://github.com/ryz310/rubocop_challenger/pull/694) Support `--only-exclude` option ([@shima-zu](https://github.com/shima-zu))
|
8
|
+
|
9
|
+
### Rubocop Challenge
|
10
|
+
|
11
|
+
- [#692](https://github.com/ryz310/rubocop_challenger/pull/692) Re-generate .rubocop_todo.yml with RuboCop v1.45.1 ([@ryz310](https://github.com/ryz310))
|
12
|
+
|
13
|
+
## v2.10.0 (Feb 12, 2023)
|
14
|
+
|
15
|
+
### Feature
|
16
|
+
|
17
|
+
- [#688](https://github.com/ryz310/rubocop_challenger/pull/688) Support ruby 3.2 ([@ryz310](https://github.com/ryz310))
|
18
|
+
|
19
|
+
### Bugfix
|
20
|
+
|
21
|
+
- [#686](https://github.com/ryz310/rubocop_challenger/pull/686) Skip bundle update if gems not related to rubocop ([@ryz310](https://github.com/ryz310))
|
22
|
+
- [#687](https://github.com/ryz310/rubocop_challenger/pull/687) Fix the cop class loader ([@ryz310](https://github.com/ryz310))
|
23
|
+
|
24
|
+
### Rubocop Challenge
|
25
|
+
|
26
|
+
- [#683](https://github.com/ryz310/rubocop_challenger/pull/683) Re-generate .rubocop_todo.yml with RuboCop v1.41.1 ([@ryz310](https://github.com/ryz310))
|
27
|
+
|
28
|
+
### Dependabot
|
29
|
+
|
30
|
+
- [#644](https://github.com/ryz310/rubocop_challenger/pull/644) Update pr_comet requirement from >= 0.5.1, < 0.7.0 to >= 0.5.1, < 0.8.0 ([@ryz310](https://github.com/ryz310))
|
31
|
+
- [#649](https://github.com/ryz310/rubocop_challenger/pull/649) Bump pry-byebug from 3.10.0 to 3.10.1 ([@ryz310](https://github.com/ryz310))
|
32
|
+
- [#657](https://github.com/ryz310/rubocop_challenger/pull/657) Bump rspec_junit_formatter from 0.5.1 to 0.6.0 ([@ryz310](https://github.com/ryz310))
|
33
|
+
- [#660](https://github.com/ryz310/rubocop_challenger/pull/660) Bump rspec from 3.11.0 to 3.12.0 ([@ryz310](https://github.com/ryz310))
|
34
|
+
- [#665](https://github.com/ryz310/rubocop_challenger/pull/665) Bump rubocop-performance from 1.15.0 to 1.15.1 ([@ryz310](https://github.com/ryz310))
|
35
|
+
- [#666](https://github.com/ryz310/rubocop_challenger/pull/666) ryz310/dependabot/bundler/rubocop-rails-2.17.3 ([@ryz310](https://github.com/ryz310))
|
36
|
+
- [#674](https://github.com/ryz310/rubocop_challenger/pull/674) Update simplecov requirement from = 0.21.2 to = 0.22.0 ([@ryz310](https://github.com/ryz310))
|
37
|
+
|
3
38
|
## v2.9.0 (Jun 02, 2022)
|
4
39
|
|
5
40
|
### Feature
|
data/Gemfile
CHANGED
@@ -6,3 +6,13 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
6
6
|
|
7
7
|
# Specify your gem's dependencies in rubocop_challenger.gemspec
|
8
8
|
gemspec
|
9
|
+
|
10
|
+
gem 'pry-byebug'
|
11
|
+
gem 'rspec'
|
12
|
+
gem 'rspec_junit_formatter'
|
13
|
+
gem 'rubocop', '>= 0.87'
|
14
|
+
gem 'rubocop-performance'
|
15
|
+
gem 'rubocop-rails'
|
16
|
+
gem 'rubocop-rake'
|
17
|
+
gem 'rubocop-rspec'
|
18
|
+
gem 'rubocop-thread_safety'
|
data/Gemfile.lock
CHANGED
@@ -1,117 +1,116 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop_challenger (2.
|
5
|
-
pr_comet (>= 0.5.1, < 0.
|
4
|
+
rubocop_challenger (2.11.0)
|
5
|
+
pr_comet (>= 0.5.1, < 0.8.0)
|
6
6
|
rainbow
|
7
|
-
rubocop (>= 0.87)
|
8
|
-
rubocop-performance
|
9
|
-
rubocop-rails
|
10
|
-
rubocop-rake
|
11
|
-
rubocop-rspec
|
12
|
-
rubocop-thread_safety
|
13
7
|
thor
|
14
8
|
yard
|
15
9
|
|
16
10
|
GEM
|
17
11
|
remote: https://rubygems.org/
|
18
12
|
specs:
|
19
|
-
activesupport (7.0.
|
13
|
+
activesupport (7.0.4.2)
|
20
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
15
|
i18n (>= 1.6, < 2)
|
22
16
|
minitest (>= 5.1)
|
23
17
|
tzinfo (~> 2.0)
|
24
|
-
addressable (2.8.
|
25
|
-
public_suffix (>= 2.0.2, <
|
18
|
+
addressable (2.8.1)
|
19
|
+
public_suffix (>= 2.0.2, < 6.0)
|
26
20
|
ast (2.4.2)
|
27
21
|
byebug (11.1.3)
|
28
22
|
coderay (1.1.3)
|
29
|
-
concurrent-ruby (1.
|
23
|
+
concurrent-ruby (1.2.0)
|
30
24
|
diff-lcs (1.5.0)
|
31
25
|
docile (1.4.0)
|
32
|
-
faraday (2.
|
33
|
-
faraday-net_http (
|
26
|
+
faraday (2.7.4)
|
27
|
+
faraday-net_http (>= 2.0, < 3.1)
|
34
28
|
ruby2_keywords (>= 0.0.4)
|
35
|
-
faraday-net_http (
|
36
|
-
i18n (1.
|
29
|
+
faraday-net_http (3.0.2)
|
30
|
+
i18n (1.12.0)
|
37
31
|
concurrent-ruby (~> 1.0)
|
32
|
+
json (2.6.3)
|
38
33
|
method_source (1.0.0)
|
39
|
-
minitest (5.
|
40
|
-
octokit (
|
34
|
+
minitest (5.17.0)
|
35
|
+
octokit (6.0.1)
|
41
36
|
faraday (>= 1, < 3)
|
42
37
|
sawyer (~> 0.9)
|
43
38
|
parallel (1.22.1)
|
44
|
-
parser (3.1.
|
39
|
+
parser (3.2.1.0)
|
45
40
|
ast (~> 2.4.1)
|
46
|
-
pr_comet (0.
|
41
|
+
pr_comet (0.7.0)
|
47
42
|
octokit
|
48
43
|
rainbow
|
49
|
-
pry (0.
|
44
|
+
pry (0.14.2)
|
50
45
|
coderay (~> 1.1)
|
51
46
|
method_source (~> 1.0)
|
52
|
-
pry-byebug (3.
|
47
|
+
pry-byebug (3.10.1)
|
53
48
|
byebug (~> 11.0)
|
54
|
-
pry (
|
55
|
-
public_suffix (
|
56
|
-
rack (
|
49
|
+
pry (>= 0.13, < 0.15)
|
50
|
+
public_suffix (5.0.1)
|
51
|
+
rack (3.0.4.1)
|
57
52
|
rainbow (3.1.1)
|
58
53
|
rake (13.0.6)
|
59
|
-
regexp_parser (2.
|
54
|
+
regexp_parser (2.7.0)
|
60
55
|
rexml (3.2.5)
|
61
|
-
rspec (3.
|
62
|
-
rspec-core (~> 3.
|
63
|
-
rspec-expectations (~> 3.
|
64
|
-
rspec-mocks (~> 3.
|
65
|
-
rspec-core (3.
|
66
|
-
rspec-support (~> 3.
|
67
|
-
rspec-expectations (3.
|
56
|
+
rspec (3.12.0)
|
57
|
+
rspec-core (~> 3.12.0)
|
58
|
+
rspec-expectations (~> 3.12.0)
|
59
|
+
rspec-mocks (~> 3.12.0)
|
60
|
+
rspec-core (3.12.1)
|
61
|
+
rspec-support (~> 3.12.0)
|
62
|
+
rspec-expectations (3.12.2)
|
68
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
-
rspec-support (~> 3.
|
70
|
-
rspec-mocks (3.
|
64
|
+
rspec-support (~> 3.12.0)
|
65
|
+
rspec-mocks (3.12.3)
|
71
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
-
rspec-support (~> 3.
|
73
|
-
rspec-support (3.
|
74
|
-
rspec_junit_formatter (0.
|
67
|
+
rspec-support (~> 3.12.0)
|
68
|
+
rspec-support (3.12.0)
|
69
|
+
rspec_junit_formatter (0.6.0)
|
75
70
|
rspec-core (>= 2, < 4, != 2.12.0)
|
76
|
-
rubocop (1.
|
71
|
+
rubocop (1.45.1)
|
72
|
+
json (~> 2.3)
|
77
73
|
parallel (~> 1.10)
|
78
|
-
parser (>= 3.
|
74
|
+
parser (>= 3.2.0.0)
|
79
75
|
rainbow (>= 2.2.2, < 4.0)
|
80
76
|
regexp_parser (>= 1.8, < 3.0)
|
81
77
|
rexml (>= 3.2.5, < 4.0)
|
82
|
-
rubocop-ast (>= 1.
|
78
|
+
rubocop-ast (>= 1.24.1, < 2.0)
|
83
79
|
ruby-progressbar (~> 1.7)
|
84
|
-
unicode-display_width (>=
|
85
|
-
rubocop-ast (1.
|
86
|
-
parser (>= 3.
|
87
|
-
rubocop-
|
80
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
81
|
+
rubocop-ast (1.26.0)
|
82
|
+
parser (>= 3.2.1.0)
|
83
|
+
rubocop-capybara (2.17.0)
|
84
|
+
rubocop (~> 1.41)
|
85
|
+
rubocop-performance (1.16.0)
|
88
86
|
rubocop (>= 1.7.0, < 2.0)
|
89
87
|
rubocop-ast (>= 0.4.0)
|
90
|
-
rubocop-rails (2.
|
88
|
+
rubocop-rails (2.17.4)
|
91
89
|
activesupport (>= 4.2.0)
|
92
90
|
rack (>= 1.1)
|
93
|
-
rubocop (>= 1.
|
91
|
+
rubocop (>= 1.33.0, < 2.0)
|
94
92
|
rubocop-rake (0.6.0)
|
95
93
|
rubocop (~> 1.0)
|
96
|
-
rubocop-rspec (2.
|
97
|
-
rubocop (~> 1.
|
94
|
+
rubocop-rspec (2.18.1)
|
95
|
+
rubocop (~> 1.33)
|
96
|
+
rubocop-capybara (~> 2.17)
|
98
97
|
rubocop-thread_safety (0.4.4)
|
99
98
|
rubocop (>= 0.53.0)
|
100
99
|
ruby-progressbar (1.11.0)
|
101
100
|
ruby2_keywords (0.0.5)
|
102
|
-
sawyer (0.9.
|
101
|
+
sawyer (0.9.2)
|
103
102
|
addressable (>= 2.3.5)
|
104
103
|
faraday (>= 0.17.3, < 3)
|
105
|
-
simplecov (0.
|
104
|
+
simplecov (0.22.0)
|
106
105
|
docile (~> 1.1)
|
107
106
|
simplecov-html (~> 0.11)
|
108
107
|
simplecov_json_formatter (~> 0.1)
|
109
108
|
simplecov-html (0.12.3)
|
110
109
|
simplecov_json_formatter (0.1.4)
|
111
110
|
thor (1.2.1)
|
112
|
-
tzinfo (2.0.
|
111
|
+
tzinfo (2.0.6)
|
113
112
|
concurrent-ruby (~> 1.0)
|
114
|
-
unicode-display_width (2.
|
113
|
+
unicode-display_width (2.4.2)
|
115
114
|
webrick (1.7.0)
|
116
115
|
yard (0.9.28)
|
117
116
|
webrick (~> 1.7.0)
|
@@ -125,8 +124,14 @@ DEPENDENCIES
|
|
125
124
|
rake (~> 13.0)
|
126
125
|
rspec
|
127
126
|
rspec_junit_formatter
|
127
|
+
rubocop (>= 0.87)
|
128
|
+
rubocop-performance
|
129
|
+
rubocop-rails
|
130
|
+
rubocop-rake
|
131
|
+
rubocop-rspec
|
132
|
+
rubocop-thread_safety
|
128
133
|
rubocop_challenger!
|
129
|
-
simplecov (= 0.
|
134
|
+
simplecov (= 0.22.0)
|
130
135
|
|
131
136
|
BUNDLED WITH
|
132
137
|
2.2.32
|
data/README.md
CHANGED
@@ -102,28 +102,29 @@ Usage:
|
|
102
102
|
rubocop_challenger go --email=EMAIL --name=NAME
|
103
103
|
|
104
104
|
Options:
|
105
|
-
--email=EMAIL
|
106
|
-
--name=NAME
|
107
|
-
f, [--file-path=FILE_PATH]
|
108
|
-
|
109
|
-
t, [--template=TEMPLATE]
|
110
|
-
[--mode=MODE]
|
111
|
-
|
112
|
-
b, [--base-branch=BASE_BRANCH]
|
113
|
-
|
114
|
-
l, [--labels=one two three]
|
115
|
-
|
116
|
-
[--project-column-name=PROJECT_COLUMN_NAME]
|
117
|
-
[--project-id=N]
|
118
|
-
[--create-pr], [--no-create-pr]
|
119
|
-
|
120
|
-
[--exclude-limit=N]
|
121
|
-
[--auto-gen-timestamp], [--no-auto-gen-timestamp]
|
122
|
-
|
123
|
-
[--offense-counts], [--no-offense-counts]
|
124
|
-
|
105
|
+
--email=EMAIL # The Pull Request committer email
|
106
|
+
--name=NAME # The Pull Request committer name
|
107
|
+
f, [--file-path=FILE_PATH] # Set your ".rubocop_todo.yml" path
|
108
|
+
# Default: .rubocop_todo.yml
|
109
|
+
t, [--template=TEMPLATE] # A Pull Request template `erb` file path.You can use variable that `title`, `rubydoc_url`, `description` and `examples` into the erb file.
|
110
|
+
[--mode=MODE] # Mode to select deletion target. You can choice "most_occurrence", "least_occurrence", or "random". If you set --no-offense-counts, the mode to be forced to "random".
|
111
|
+
# Default: most_occurrence
|
112
|
+
b, [--base-branch=BASE_BRANCH] # The Branch to merge into
|
113
|
+
# Default: master
|
114
|
+
l, [--labels=one two three] # Label to give to Pull Request
|
115
|
+
# Default: ["rubocop challenge"]
|
116
|
+
[--project-column-name=PROJECT_COLUMN_NAME] # A project column name. You can add the created PR to the GitHub project
|
117
|
+
[--project-id=N] # A target project ID. If does not supplied, this method will find a project which associated the repository. When the repository has multiple projects, you should supply this.
|
118
|
+
[--create-pr], [--no-create-pr] # If you set --no-create-pr, no create a pull request (for testing)
|
119
|
+
# Default: true
|
120
|
+
[--exclude-limit=N] # For how many exclude properties on create .rubocop_todo.yml
|
121
|
+
[--auto-gen-timestamp], [--no-auto-gen-timestamp] # Include the date and time in .rubocop_todo.yml
|
122
|
+
# Default: true
|
123
|
+
[--offense-counts], [--no-offense-counts] # Include offense counts in .rubocop_todo.yml
|
124
|
+
# Default: true
|
125
125
|
[--only-safe-autocorrect], [--no-only-safe-autocorrect] # If given `true`, it executes `rubocop --autocorrect`,it means to correct safe cops only.
|
126
|
-
[--
|
126
|
+
[--only-exclude], [--no-only-exclude] # If you set --only-exclude, exclude files instead of generating Max parameters in Metrics cops when creating .rubocop_todo.yml automatically.
|
127
|
+
[--verbose], [--no-verbose] # Displays executing command.
|
127
128
|
|
128
129
|
Run `$ rubocop --autocorrect` and create a PR to GitHub repo
|
129
130
|
```
|
data/challenger.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'rubocop_challenger'
|
9
9
|
spec.version = RubocopChallenger::VERSION
|
10
10
|
spec.authors = ['ryosuke_sato']
|
11
|
-
spec.email = ['
|
11
|
+
spec.email = ['ryz310@gmail.com']
|
12
12
|
|
13
13
|
spec.summary = 'Make a clean your rubocop_todo.yml with CI'
|
14
14
|
spec.description = spec.summary
|
@@ -24,23 +24,14 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = '>= 2.7'
|
26
26
|
|
27
|
-
spec.add_runtime_dependency 'pr_comet', '>= 0.5.1', '< 0.
|
27
|
+
spec.add_runtime_dependency 'pr_comet', '>= 0.5.1', '< 0.8.0'
|
28
28
|
spec.add_runtime_dependency 'rainbow'
|
29
|
-
spec.add_runtime_dependency 'rubocop', '>= 0.87'
|
30
|
-
spec.add_runtime_dependency 'rubocop-performance'
|
31
|
-
spec.add_runtime_dependency 'rubocop-rails'
|
32
|
-
spec.add_runtime_dependency 'rubocop-rake'
|
33
|
-
spec.add_runtime_dependency 'rubocop-rspec'
|
34
|
-
spec.add_runtime_dependency 'rubocop-thread_safety'
|
35
29
|
spec.add_runtime_dependency 'thor'
|
36
30
|
spec.add_runtime_dependency 'yard'
|
37
31
|
|
38
32
|
spec.add_development_dependency 'bundler', '>= 2.0'
|
39
|
-
spec.add_development_dependency 'pry-byebug'
|
40
33
|
spec.add_development_dependency 'rake', '~> 13.0'
|
41
|
-
spec.add_development_dependency '
|
42
|
-
spec.add_development_dependency 'rspec_junit_formatter'
|
43
|
-
spec.add_development_dependency 'simplecov', '0.21.2'
|
34
|
+
spec.add_development_dependency 'simplecov', '0.22.0'
|
44
35
|
spec.metadata = {
|
45
36
|
'rubygems_mfa_required' => 'true'
|
46
37
|
}
|
@@ -14,7 +14,10 @@ module RubocopChallenger
|
|
14
14
|
#
|
15
15
|
# @param gem_names [Array<String>] The target gem names
|
16
16
|
def update(*gem_names)
|
17
|
-
|
17
|
+
target_gems = gem_names.select { |gem_name| installed?(gem_name) }
|
18
|
+
return if target_gems.empty?
|
19
|
+
|
20
|
+
run('update', *target_gems, '--conservative')
|
18
21
|
end
|
19
22
|
|
20
23
|
# Checks the gem is installed
|
@@ -70,6 +70,11 @@ module RubocopChallenger
|
|
70
70
|
default: false,
|
71
71
|
desc: 'If given `true`, it executes `rubocop --autocorrect`,' \
|
72
72
|
'it means to correct safe cops only.'
|
73
|
+
option :only_exclude,
|
74
|
+
type: :boolean,
|
75
|
+
default: false,
|
76
|
+
desc: 'If you set --only-exclude, exclude files instead of generating Max parameters ' \
|
77
|
+
'in Metrics cops when creating .rubocop_todo.yml automatically.'
|
73
78
|
option :verbose,
|
74
79
|
type: :boolean,
|
75
80
|
default: false,
|
@@ -59,7 +59,7 @@ module RubocopChallenger
|
|
59
59
|
def update_rubocop!
|
60
60
|
bundler = Bundler::Command.new(verbose: options[:verbose])
|
61
61
|
pull_request.commit! ':police_car: $ bundle update rubocop' do
|
62
|
-
bundler.update(*
|
62
|
+
bundler.update(*RUBOCOP_GEMS)
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -186,7 +186,8 @@ module RubocopChallenger
|
|
186
186
|
{
|
187
187
|
exclude_limit: options[:exclude_limit],
|
188
188
|
auto_gen_timestamp: options[:auto_gen_timestamp],
|
189
|
-
offense_counts: options[:offense_counts]
|
189
|
+
offense_counts: options[:offense_counts],
|
190
|
+
only_exclude: options[:only_exclude]
|
190
191
|
}
|
191
192
|
end
|
192
193
|
|
@@ -20,11 +20,13 @@ module RubocopChallenger
|
|
20
20
|
# @param exclude_limit [Integer] default: nil
|
21
21
|
# @param auto_gen_timestamp [Boolean] default: true
|
22
22
|
# @param offense_counts [Boolean] default: true
|
23
|
-
|
23
|
+
# @param only_exclude [Boolean] default: false
|
24
|
+
def auto_gen_config(exclude_limit: nil, auto_gen_timestamp: true, offense_counts: true, only_exclude: false)
|
24
25
|
commands = ['--auto-gen-config']
|
25
26
|
commands << "--exclude-limit #{exclude_limit}" if exclude_limit
|
26
27
|
commands << '--no-auto-gen-timestamp' unless auto_gen_timestamp
|
27
28
|
commands << '--no-offense-counts' unless offense_counts
|
29
|
+
commands << '--auto-gen-only-exclude' if only_exclude
|
28
30
|
run(*commands)
|
29
31
|
end
|
30
32
|
|
@@ -5,7 +5,7 @@ module RubocopChallenger
|
|
5
5
|
# To read YARD style documentation from rubocop gem source code
|
6
6
|
class Yardoc
|
7
7
|
def initialize(cop)
|
8
|
-
|
8
|
+
load_rubocop_gems!
|
9
9
|
@cop_class = find_cop_class(cop)
|
10
10
|
load_yardoc!
|
11
11
|
end
|
@@ -32,8 +32,8 @@ module RubocopChallenger
|
|
32
32
|
attr_reader :cop_class, :yardoc
|
33
33
|
|
34
34
|
# Loads gems for YARDoc creation
|
35
|
-
def
|
36
|
-
|
35
|
+
def load_rubocop_gems!
|
36
|
+
RUBOCOP_GEMS.each do |dependency|
|
37
37
|
require dependency
|
38
38
|
rescue LoadError
|
39
39
|
nil
|
@@ -46,9 +46,9 @@ module RubocopChallenger
|
|
46
46
|
# @param cop [String] The target cop name (e.g. "Performance/Size")
|
47
47
|
# @return [RuboCop::Cop] Found a RuboCop::Cop class
|
48
48
|
def find_cop_class(cop)
|
49
|
-
Object.const_get("RuboCop::Cop::#{cop.
|
49
|
+
Object.const_get("RuboCop::Cop::#{cop.gsub('/', '::')}")
|
50
50
|
rescue NameError
|
51
|
-
Object.const_get("RuboCop::Cop::RSpec::#{cop.
|
51
|
+
Object.const_get("RuboCop::Cop::RSpec::#{cop.gsub('/', '::')}")
|
52
52
|
end
|
53
53
|
|
54
54
|
# Loads yardoc from the RuboCop::Cop class file
|
data/lib/rubocop_challenger.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop_challenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryosuke_sato
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pr_comet
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 0.5.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.8.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 0.5.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.8.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rainbow
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,90 +44,6 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: rubocop
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0.87'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0.87'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rubocop-performance
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: rubocop-rails
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
82
|
-
type: :runtime
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: rubocop-rake
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '0'
|
96
|
-
type: :runtime
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: rubocop-rspec
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
|
-
type: :runtime
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: rubocop-thread_safety
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - ">="
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
124
|
-
type: :runtime
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - ">="
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '0'
|
131
47
|
- !ruby/object:Gem::Dependency
|
132
48
|
name: thor
|
133
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,20 +86,6 @@ dependencies:
|
|
170
86
|
- - ">="
|
171
87
|
- !ruby/object:Gem::Version
|
172
88
|
version: '2.0'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: pry-byebug
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - ">="
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '0'
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - ">="
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '0'
|
187
89
|
- !ruby/object:Gem::Dependency
|
188
90
|
name: rake
|
189
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,51 +100,23 @@ dependencies:
|
|
198
100
|
- - "~>"
|
199
101
|
- !ruby/object:Gem::Version
|
200
102
|
version: '13.0'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: rspec
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - ">="
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '0'
|
208
|
-
type: :development
|
209
|
-
prerelease: false
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - ">="
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: '0'
|
215
|
-
- !ruby/object:Gem::Dependency
|
216
|
-
name: rspec_junit_formatter
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - ">="
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0'
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - ">="
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: '0'
|
229
103
|
- !ruby/object:Gem::Dependency
|
230
104
|
name: simplecov
|
231
105
|
requirement: !ruby/object:Gem::Requirement
|
232
106
|
requirements:
|
233
107
|
- - '='
|
234
108
|
- !ruby/object:Gem::Version
|
235
|
-
version: 0.
|
109
|
+
version: 0.22.0
|
236
110
|
type: :development
|
237
111
|
prerelease: false
|
238
112
|
version_requirements: !ruby/object:Gem::Requirement
|
239
113
|
requirements:
|
240
114
|
- - '='
|
241
115
|
- !ruby/object:Gem::Version
|
242
|
-
version: 0.
|
116
|
+
version: 0.22.0
|
243
117
|
description: Make a clean your rubocop_todo.yml with CI
|
244
118
|
email:
|
245
|
-
-
|
119
|
+
- ryz310@gmail.com
|
246
120
|
executables:
|
247
121
|
- rubocop_challenger
|
248
122
|
extensions: []
|
@@ -313,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
187
|
- !ruby/object:Gem::Version
|
314
188
|
version: '0'
|
315
189
|
requirements: []
|
316
|
-
rubygems_version: 3.
|
190
|
+
rubygems_version: 3.4.6
|
317
191
|
signing_key:
|
318
192
|
specification_version: 4
|
319
193
|
summary: Make a clean your rubocop_todo.yml with CI
|