-
-
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
A semicolon in the same line as the method signature is allowed #4252
Comments
Likely a bug in the detection of one-line methods. |
Hm. I don't particularly like the suggested behaviour. I am more inclined to consider this a case of a misnamed cop. Perhaps it should be Perhaps |
When opening the issue, I wasn’t sure whether to blame |
@Drenmi The purpose of this cop was to find multiple expressions on the same line, that should actually be on separate lines. Many early day cops have horrible names. I didn't really think much about them back then. |
And, of course, like most very old cops - this one has poor documentation and no code examples. 😄 |
A semicolon in the same line as the method signature isn’t violating any existing cop.
Expected behavior
I expect RuboCop (Style/Semicolon) to complain about having a semicolon after
def foo
.Actual behavior
No offenses detected.
Steps to reproduce the problem
Run
rubocop
on this file:RuboCop version
The text was updated successfully, but these errors were encountered: