-
-
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
Change misleading message of Style/EmptyLinesAroundAccessModifier:
#3503
Comments
I was gonna point out that But that’s actually a bad argument, since
|
Suggested fix in #3527. |
The `Style/EmptyLinesAroundAccessModifier` would always say it needed a blank line both above and below an access modifier, even if it was at the beginning of a class, module, or block, where there actually shouldn't be a blank line above.
The `Style/EmptyLinesAroundAccessModifier` would always say it needed a blank line both above and below an access modifier, even if it was at the beginning of a class, module, or block, where there actually shouldn't be a blank line above.
If we have file
test.rb
with code:rubocop show warning:
test.rb:2:3: C: Keep a blank line before and after private.
Ok, manually add blank line before and after private:
No good:
test.rb:2:1: C: Extra empty line detected at module body beginning.
Accroding to #3480 (comment) - best way is to make two different messages for both cases.
RuboCop version
The text was updated successfully, but these errors were encountered: