Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --ignore-unrecognized-cops option always showing empty warning even if there was no problem #10676

Conversation

nobuyo
Copy link
Contributor

@nobuyo nobuyo commented May 28, 2022

The internal condition was wrong, and the message The following cops or departments are ... was always displayed with just the option is specified.

Reported at: #10630 (comment)

$ bundle exec rubocop --ignore-unrecognized-cops
The following cops or departments are not recognized and will be ignored: # <--- 👀 

Inspecting 2 files
.W

...

Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@nobuyo nobuyo force-pushed the fix-warning-always-printed-on-ignore-unrecognized-cops branch 2 times, most recently from c972956 to 214b753 Compare May 28, 2022 15:01
@nobuyo nobuyo marked this pull request as ready for review May 28, 2022 15:02
Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

…even if there was no problem

Update lib/rubocop/config_validator.rb

Co-authored-by: Koichi ITO <koic.ito@gmail.com>
@nobuyo nobuyo force-pushed the fix-warning-always-printed-on-ignore-unrecognized-cops branch from 4da2e58 to 9600787 Compare May 29, 2022 00:25
@nobuyo nobuyo requested a review from koic May 29, 2022 02:32
@koic koic merged commit 14ae24b into rubocop:master May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants