-
-
Notifications
You must be signed in to change notification settings - Fork 755
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
ignoreAnnotated not respected on UnnecessaryAbstractClass #4356
Comments
I was unable to reproduce the issue in a POC project with the following
This used Detekt 1.19.0 with the following configuration:
In addition, the project uses Kotlin 1.6.0 and Gradle 7.3.1. Would you be able to give a more detailed description of the code base layout and the Detekt configuration file in full? |
Hi @severn-everett, my project is also affected by this issue. You should be able to reproduce it checking out the branch if you run
|
I think that this issue issue is virtually the same as: #4355 (comment) and the same "workaround" should work. |
@BraisGabin yep, I can confirm that changing
to
is a valid workaround. |
@leinardi Your project is for Android, whereas I only have JVM-based projects on my machine. I'm wondering if this could be an issue specific with Android; would you have this issue if you tried setting it up in a JVM-based project? |
I'm pretty sure that Detekt runs on JVM even if the project is an Android project: every Gradle task that runs on my local machine does not run on the Android Runtime (ART) but on my local JVM. The ART is used only on emulators and real Android devices.
@cortinico you are also an Android developer, do you think this could be Android specific? |
I realized that |
- Using 'dagger.Module' triggers UnnecessaryAbstractClass, replacing it with 'Module' fixes the warning - See: detekt/detekt#4356 Signed-off-by: Alvin Dizon <alvin.dizon91@gmail.com>
- Using 'dagger.Module' triggers UnnecessaryAbstractClass, replacing it with 'Module' fixes the warning - See: detekt/detekt#4356 Signed-off-by: Alvin Dizon <alvin.dizon91@gmail.com>
Expected Behavior
After migrating to
ignoreAnnotated
per deprecation warning messages, it's no longer respecting the annotations we specifyDetekt 1.18.0
Warns
Detekt 1.19.0
Observed Behavior
It incorrectly warns about classes annotated with
dagger.Module
Steps to Reproduce
Here's an example module
Context
It is a regression
Your Environment
--scan
option when running the gradle task): N/AThe text was updated successfully, but these errors were encountered: