rubocop_challenger 2.10.0 → 2.11.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: fd480b9644a15ff8dd4826189460791114badf59b888627bb1f2c0dd737c0d9e
4
- data.tar.gz: 286460895c9301a0bb45a40cfcbc59ec93a7a7ee39bf7882027b013c2cf727e7
3
+ metadata.gz: 82b6fa7b23d50f33ca85756d2e519b1efcf0f5eebdd842a3e57d56f3171a05ff
4
+ data.tar.gz: 60585334284a50465bf407fbf0e3bde55a69a4b24360ff3d6cdbcacfb7970202
5
5
  SHA512:
6
- metadata.gz: d5b660bee27fb1ecce41a518f2d500377b7ece212381d140af570bbc4466ed07cd636bdbabe84689066fdae11be1307dcc8c88801fb3461311ebb72adeac1de3
7
- data.tar.gz: de601dc9b3e25f1bac75442cbeea4a7051e3326b68e2ed3232b3b72e584cecb60465d6c458ceed1ab321395765439f00cfdd0bbc7c28f2eec2c0c5ef087b4a13
6
+ metadata.gz: 6ab7e3c8e0b79f9025f1e1cafc39e028527a1b8a284f5bf8707f641e995ce331d884870ae72252ee1c18420330a38459f37ce8f928296f304c494d2129224fdc
7
+ data.tar.gz: 04d54d823c21247dd897e4e1c99fa7fbee686b7ab94c7bd79098f56f00b6f75c1f508b5d8d57ada5f01c2ca0f32bc91de41f43269e089d3f5f04c545c35f69b9
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.41.1.
3
+ # using RuboCop version 1.48.0.
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,25 @@
1
1
  # Change log
2
2
 
3
+ ## v2.11.1 (Mar 07, 2023)
4
+
5
+ ### Bugfix
6
+
7
+ - [#702](https://github.com/ryz310/rubocop_challenger/pull/702) Fix the runtime dependency ([@ryz310](https://github.com/ryz310))
8
+
9
+ ### Rubocop Challenge
10
+
11
+ - [#701](https://github.com/ryz310/rubocop_challenger/pull/701) Re-generate .rubocop_todo.yml with RuboCop v1.47.0 ([@ryz310](https://github.com/ryz310))
12
+
13
+ ## v2.11.0 (Feb 15, 2023)
14
+
15
+ ### Feature
16
+
17
+ - [#694](https://github.com/ryz310/rubocop_challenger/pull/694) Support `--only-exclude` option ([@shima-zu](https://github.com/shima-zu))
18
+
19
+ ### Rubocop Challenge
20
+
21
+ - [#692](https://github.com/ryz310/rubocop_challenger/pull/692) Re-generate .rubocop_todo.yml with RuboCop v1.45.1 ([@ryz310](https://github.com/ryz310))
22
+
3
23
  ## v2.10.0 (Feb 12, 2023)
4
24
 
5
25
  ### Feature
data/Gemfile CHANGED
@@ -10,9 +10,3 @@ gemspec
10
10
  gem 'pry-byebug'
11
11
  gem 'rspec'
12
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,9 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (2.10.0)
4
+ rubocop_challenger (2.11.1)
5
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
7
13
  thor
8
14
  yard
9
15
 
@@ -20,7 +26,7 @@ GEM
20
26
  ast (2.4.2)
21
27
  byebug (11.1.3)
22
28
  coderay (1.1.3)
23
- concurrent-ruby (1.2.0)
29
+ concurrent-ruby (1.2.2)
24
30
  diff-lcs (1.5.0)
25
31
  docile (1.4.0)
26
32
  faraday (2.7.4)
@@ -31,7 +37,7 @@ GEM
31
37
  concurrent-ruby (~> 1.0)
32
38
  json (2.6.3)
33
39
  method_source (1.0.0)
34
- minitest (5.17.0)
40
+ minitest (5.18.0)
35
41
  octokit (6.0.1)
36
42
  faraday (>= 1, < 3)
37
43
  sawyer (~> 0.9)
@@ -48,7 +54,7 @@ GEM
48
54
  byebug (~> 11.0)
49
55
  pry (>= 0.13, < 0.15)
50
56
  public_suffix (5.0.1)
51
- rack (3.0.4.1)
57
+ rack (3.0.4.2)
52
58
  rainbow (3.1.1)
53
59
  rake (13.0.6)
54
60
  regexp_parser (2.7.0)
@@ -68,35 +74,35 @@ GEM
68
74
  rspec-support (3.12.0)
69
75
  rspec_junit_formatter (0.6.0)
70
76
  rspec-core (>= 2, < 4, != 2.12.0)
71
- rubocop (1.45.1)
77
+ rubocop (1.48.0)
72
78
  json (~> 2.3)
73
79
  parallel (~> 1.10)
74
80
  parser (>= 3.2.0.0)
75
81
  rainbow (>= 2.2.2, < 4.0)
76
82
  regexp_parser (>= 1.8, < 3.0)
77
83
  rexml (>= 3.2.5, < 4.0)
78
- rubocop-ast (>= 1.24.1, < 2.0)
84
+ rubocop-ast (>= 1.26.0, < 2.0)
79
85
  ruby-progressbar (~> 1.7)
80
86
  unicode-display_width (>= 2.4.0, < 3.0)
81
- rubocop-ast (1.26.0)
87
+ rubocop-ast (1.27.0)
82
88
  parser (>= 3.2.1.0)
83
- rubocop-capybara (2.17.0)
89
+ rubocop-capybara (2.17.1)
84
90
  rubocop (~> 1.41)
85
91
  rubocop-performance (1.16.0)
86
92
  rubocop (>= 1.7.0, < 2.0)
87
93
  rubocop-ast (>= 0.4.0)
88
- rubocop-rails (2.17.4)
94
+ rubocop-rails (2.18.0)
89
95
  activesupport (>= 4.2.0)
90
96
  rack (>= 1.1)
91
97
  rubocop (>= 1.33.0, < 2.0)
92
98
  rubocop-rake (0.6.0)
93
99
  rubocop (~> 1.0)
94
- rubocop-rspec (2.18.1)
100
+ rubocop-rspec (2.19.0)
95
101
  rubocop (~> 1.33)
96
102
  rubocop-capybara (~> 2.17)
97
103
  rubocop-thread_safety (0.4.4)
98
104
  rubocop (>= 0.53.0)
99
- ruby-progressbar (1.11.0)
105
+ ruby-progressbar (1.13.0)
100
106
  ruby2_keywords (0.0.5)
101
107
  sawyer (0.9.2)
102
108
  addressable (>= 2.3.5)
@@ -124,12 +130,6 @@ DEPENDENCIES
124
130
  rake (~> 13.0)
125
131
  rspec
126
132
  rspec_junit_formatter
127
- rubocop (>= 0.87)
128
- rubocop-performance
129
- rubocop-rails
130
- rubocop-rake
131
- rubocop-rspec
132
- rubocop-thread_safety
133
133
  rubocop_challenger!
134
134
  simplecov (= 0.22.0)
135
135
 
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 # 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
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
- [--verbose], [--no-verbose] # Displays executing command.
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
@@ -26,6 +26,12 @@ Gem::Specification.new do |spec|
26
26
 
27
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'
29
35
  spec.add_runtime_dependency 'thor'
30
36
  spec.add_runtime_dependency 'yard'
31
37
 
@@ -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,
@@ -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
- def auto_gen_config(exclude_limit: nil, auto_gen_timestamp: true, offense_counts: true)
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '2.10.0'
4
+ VERSION = '2.11.1'
5
5
  end
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.10.0
4
+ version: 2.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryosuke_sato
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-12 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
@@ -44,6 +44,90 @@ 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'
47
131
  - !ruby/object:Gem::Dependency
48
132
  name: thor
49
133
  requirement: !ruby/object:Gem::Requirement