We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Style/GuardClause
Currently, Style/GuardClause only looks at statically-defined methods, and skips those defined via define_method or define_singleton_method:
define_method
define_singleton_method
def foo if cond 42 # Style/GuardClause flagged ✔️ end end define_method(:bar) do if cond 42 # Style/GuardClause ignores 😔 end end
The text was updated successfully, but these errors were encountered:
[Fix rubocop#12128] Make Style/GuardClause aware of define_method
e1db272
Fixes rubocop#12128. This PR makes `Style/GuardClause` aware of `define_method`.
[Fix #12128] Make Style/GuardClause aware of define_method
5537b0c
Fixes #12128. This PR makes `Style/GuardClause` aware of `define_method`.
Successfully merging a pull request may close this issue.
Currently,
Style/GuardClause
only looks at statically-defined methods, and skips those defined viadefine_method
ordefine_singleton_method
:The text was updated successfully, but these errors were encountered: