Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd OptionalBooleanParameter AllowedMethods configuration #8489
Comments
|
Good point. |
Hmm, I don't know. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the solution you'd like
When using
Style/OptionalBooleanParameter, it would be nice to define a set of allowed methods as used via Style/NestedParenthesizedCalls, for example. For instance, when metaprograming, it's common to want to useObject#respond_to_missing?:The use of
include_private = false, in this case, is what causes this cop to flag the code as a violation. I agree, it is. ...but this is a standard library method which is out of my control as an implementer.Describe alternatives you've considered
I've been able temporarily work around this issue by using an exclude:
This is not ideal as I'd rather not exclude the entire file but ignore a bad practice within the standard library that is out of my control instead.