-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Allow configuration of visibility_and_def_on_same_line? method #1467
Comments
I am having this issue using Memoist gem one of the use cases is memoize def method_name
method_body
end |
Yep, this would be nice ! 👍 |
Just came across this myself. What about not caring what comes before the |
Patches welcome. :-) |
@bbatsov Would you say it's OK not to check what comes before |
fphilipe
added a commit
to fphilipe/rubocop
that referenced
this issue
Jul 2, 2015
Previously, only certain methods primarily related to method visibility were allowed before a `def`. This changes the behavior such that anything before `def` is allowed. Closes rubocop#1467
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ruby 2.1 syntax allows method modifiers to be placed right before method declarations, like:
Currently, only
[:public, :protected, :private, :module_function]
method modifiers supported.It would be nice to have this list configured by
.rubocop.yml
file. In particular, Rails features like helper_method or before_action, etc.:All mentioned happens in
lib/rubocop/cop/mixin/on_method.rb
file. Please, suggest similar place in codebase, where such configuration is already implement, so I can take a look and create a pull request for this ticket.The text was updated successfully, but these errors were encountered: