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
[#8489] Exclude method respond_to_missing? from OptionalBooleanParameter cop. #8725
[#8489] Exclude method respond_to_missing? from OptionalBooleanParameter cop. #8725
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff 👍
CHANGELOG.md
Outdated
@@ -45,6 +45,7 @@ | |||
* [#8500](https://github.com/rubocop-hq/rubocop/issues/8500): Add `in?` to AllowedMethods for `Lint/SafeNavigationChain` cop. ([@tejasbubane][]) | |||
* [#8629](https://github.com/rubocop-hq/rubocop/pull/8629): Fix the cache being reusable in CI by using crc32 to calculate file hashes rather than `mtime`, which changes each CI build. ([@dvandersluis][]) | |||
* [#8621](https://github.com/rubocop-hq/rubocop/issues/8621): Add helpful Infinite Loop error message. ([@iSarCasm][]) | |||
* [#8489](https://github.com/rubocop-hq/rubocop/issues/8489): Exclude method :respond_to_missing? from OptionalBooleanParameter cop. ([@em-gazelle][]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please format this as:
Exclude method `respond_to_missing?` from `Style/OptionalBooleanParameter` cop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you! Just made the change.
da914a1
to
2ef9bcd
Compare
…OptionalBooleanParameter cop.
2ef9bcd
to
2f4a16d
Compare
Thank you! 👍 |
Great PR indeed! Down the road it might be good to move this list of excluded methods to the cop configuration, so that users can tweak it, but the suggested solution works fine for now. |
This PR stops the OptionalBooleanParameter cop from complaining about code calling Ruby's
respond_to_missing?(arg, private = false)
method in response to issue 8489.This is currently non-configurable, but I'm happy to modify it if that'd be useful!
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.