-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
Detekt 1.22.0-RC1 -> 1.22.0-RC2 breaks ignoreAnnotated #5427
Comments
Thanks for reporting this @G00fY2. It looks like a regression that should be addressed before we call 1.22 stable. |
@3flex @cortinico I was able to pin down the issue to this commit: 505d6d7 Reverting these changes fixes the ignored Unfortunately I was not able to write a failing test. Still hope this information helps. |
Thanks for finding the offending commit. We can revert the commit and reintroduce #5150, or find a better fix for that which doesn't introduce a regression. |
Even though configuration cache is an incubating feature I know that many people are already using it (we also have it enabled). Regardless of whether we decide to simply revert the changes it would be nice to have a test that makes sure this regression will not appear again. Strangely enough when I try to run the following tests on my machine, everything succeeds: G00fY2@9ed069a |
We strive for configuration cache compatibility and on non-Android projects at least I'm not aware of any issues currently. That said, it would be best to prioritise correctness over performance. We should revert that PR, break config cache and fix this issue. |
We should find a proper fix then instead of reverting - though detekt being on an older Kotlin version shouldn't block you from updating the dependency for your project. Please open a separate issue for that. |
Not sure what you think about this and if this is already in planing. But what about moving away from the already old (already deprecated) BaseVariant API to the new one: https://medium.com/androiddevelopers/new-apis-in-the-android-gradle-plugin-f5325742e614 There are new shiny APIs for accessing the compileClasspath e.g. This would maybe fix some of the issues about the Android setups. Only drawback is that AGP compatibility will jump to 7.3 and a lot of APIs are marked as Incubating. Here is a first idea how this could look like: main...G00fY2:detekt:variant-migration-wip |
I would be OK about bumping it to |
After updating from Detekt 1.22.0-RC1 to 1.22.0-RC2 the
ignoreAnnotated
configurations are not used.Expected Behavior
Specific rules for code annotated with an annotation defined in
ignoreAnnotated
should be ignored.Observed Behavior
Code gets reported despite the
ignoreAnnotated
configuration.Steps to Reproduce
The config file.
Build report with 1.22.0-RC1.
Build report with 1.22.0-RC2.
Your Environment
See the sample project. Also occurred in other (closed source) project with stable release versions (AGP 7.3.1, Compose 1.2.1).
The text was updated successfully, but these errors were encountered: