-
Notifications
You must be signed in to change notification settings - Fork 280
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
TooManyMethods false positive with nested classes #1476
Comments
Hi @eloyesp, thanks for reporting this. We do intend to support such code in Reek, so this is a bug. |
I were checking a little bit, but I lack experience with the parser library. It seems that the AST that should be detected is something like:
But I'm not sure how to implement that. |
I'll take a look in the coming week. I think we already handle this construction elsewhere, so it shouldn't be too hard to fix this. |
@JuanVqz check out the config for TooManyMethods. I think you just need to put more dummy methods in your example and then this should indeed be falsely reported (since we never fixed that bug) |
I'm having false positive with TooManyMethods, with a code that looks like this:
Seems that reek does not catch the context switch when defining methods on the
Struct
.Is it possible for it to detect it or should I add a magic comment (or may be just define the struct in other way).
The text was updated successfully, but these errors were encountered: