-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an error when running
--only
or --except
options
This PR fixes an error when running `rubocop --only` or `rubocop --except` options without cop name argument. ## Before ```consle % rubocop --only undefined method `empty?' for nil:NilClass /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.82.0/lib/rubocop/options.rb:87:in `block in add_cop_selection_csv_option' /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.82.0/lib/rubocop/options.rb:206:in `block in option' /Users/koic/.rbenv/versions/2.7.1/lib/ruby/2.7.0/optparse.rb:1589:in `block in parse_in_order' /Users/koic/.rbenv/versions/2.7.1/lib/ruby/2.7.0/optparse.rb:1575:in `catch' ``` ## After ```console % rubocop --only --only argument should be [COP1,COP2,...]. ``` The same is true for `rubocop --except`.
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters