-
-
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
ClassAndModuleChildren incorrectly flags classes with a single method #1094
Comments
Yep, this definitely looks like a bug. |
Glad to know it's not just me :-) |
I can take a look, if you like. |
@geniou That would be great! |
bbatsov
added a commit
that referenced
this issue
May 18, 2014
…_method [Fixes #1094] Fix bug in ClassAndModuleChildren
Wow you guys are super fast!! I'm impressed. Thanks! Now how about a bugfix release to RubyGems? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like the compact style of class and method definition and therefore have the following in my
.rubocop.yml
:However this erroneously flags the following module:
with this offense message:
It seems as if it is detecting that the class has a single child and therefore prompting me to try and combine it. This works for classes/modules with a single inner class/module, but is impossible when the contents is a method.
The offense should not be reported if the single child is not a class/module.
The text was updated successfully, but these errors were encountered: