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
UnnecessaryAbstractClass should report empty abstract classes #4357
Comments
That was a long time ago. As far as I remember, this was added due to a clash with the EmptyClass rule. |
Would you be able to elaborate about this? The |
If both rules are enabled, this snippet triggers both rules resulting in 2 reports. |
How would this get reproduced? Running Detekt on |
So, green light. @severn-everett can you create a PR fixing this? |
Will do, after I work on another use case I discovered for PR #4353 |
This was the case back then before detekt v1.0 got released. Quite some time passed since then. |
Closed by a9ce1e2 |
The rule
UnnecessaryAbstractClass
will not mark an abstract class that has no member declarations (e.g.abstract class Foo
) as violating the rule. However, adding brackets to the class declaration (e.g.abstract class Foo{}
) will trigger the rule. Semantically, these appear to be the same declaration, soUnnecessaryAbstractClass
should be refactored to trigger in both scenarios.The text was updated successfully, but these errors were encountered: