rubocop_challenger 2.10.0 → 2.11.0

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: 74d7441edd6ad94af1986092269c6bfa5e88301d2a394e2afe22fdffa769f13f
4
+ data.tar.gz: 4b1e41dad793b69a1de7269e0ddf57e829833d2e8aa183084bb1c6d5dab3ef9d
5
5
  SHA512:
6
- metadata.gz: d5b660bee27fb1ecce41a518f2d500377b7ece212381d140af570bbc4466ed07cd636bdbabe84689066fdae11be1307dcc8c88801fb3461311ebb72adeac1de3
7
- data.tar.gz: de601dc9b3e25f1bac75442cbeea4a7051e3326b68e2ed3232b3b72e584cecb60465d6c458ceed1ab321395765439f00cfdd0bbc7c28f2eec2c0c5ef087b4a13
6
+ metadata.gz: fa8b435983aed3fe1dfaca1c44104075ff3a7cdb32438328faeb922b63284c667216ee1db4b4f87672dad07af9a9ad0f497a6d331f4916192e435ce7bc8f2cbc
7
+ data.tar.gz: 5c2554befa82ac34cfd83486febc91a933b4c3608cc1ce1ed3c9ee0b80e8ceb982cbde456ad047034d05e331a13c99d811d9d9bcf465380e2b65d2a3bfefd862
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.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,15 @@
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
+
3
13
  ## v2.10.0 (Feb 12, 2023)
4
14
 
5
15
  ### Feature
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (2.10.0)
4
+ rubocop_challenger (2.11.0)
5
5
  pr_comet (>= 0.5.1, < 0.8.0)
6
6
  rainbow
7
7
  thor
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
  ```
@@ -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.0'
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.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: 2023-02-12 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet