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 #7740] Make Style/AccessModifierDeclarations
not flag symbol method-name
#7762
Conversation
The cop documentation should definitely be updated to reflect this. I think we also need some flag to enable/disable this, as if you're using modifiers in this manner, you're potentially violating grouping/non-grouping. That's why I'd prefer having more control over the behaviour. |
4c8ff3b
to
565b9f6
Compare
@bbatsov Fixed to use node-matcher instead of explicit checks. Regarding flag to turn this feature off, do you think the following configs make sense?
Let me know if you have something else in mind. |
@tejasbubane Maybe it might make more sense to have it be a flag? An argument could even be made to put it under a separate rule (ie. |
Exactly. This shouldn't be a style, it should a flag that affects both styles - something like |
@bbatsov I added config option to |
f7207e2
to
3bb61a3
Compare
I'd also extend the cop documentation to mention that it covers only definitions and applications of visibility methods to symbols are controlled by the new config. |
Added. |
736bae4
to
e2253b7
Compare
…ymbol method-name Closes rubocop#7740
Thanks! |
Closes #7740
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.