-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
Baseline generation w/ type resolution produces UnusedImports false negative #3123
Comments
Can you elaborate a bit more? A snippet of code that reproduces the false positive would be nice. |
Also would be relevant to understand if you have Type Resolution enabled or not. We noticed several false positives in the past weeks related to |
Type resolution is enabled. It seems EVERY import statement is now flagged as unused in the baseline generation. In normal mode, it works as expected. I'll try to get a sample repro case this week. |
I believe we addressed this in #3079 that is included in |
The issue exists in all versions above 1.13.1 (including 1.14.0 and 1.14.1). 1.12.0 was the last working version. I also tried a build of the 1.14.1 tag with a revert on #3079 and it still occurred. Note that we're using the CLI through a wrapper in Buck (no gradle plugin). |
We narrowed it down to a change in parsing CLI arguments. In previous versions (1.12 and below), we were able to delimit classpath jars using a semicolon. We were doing that using the detekt-cli through an args file.
In the newer versions, it seems a comma or colon is required.
The UnusedImport seemed to be a side effect, not exactly sure why that one was firing, but when resolving it in our args file generation, the problem dissapears. So going to mark this as closed. |
Linking #3084 for further information. |
1.12.0 was fine for us.
When generating the baseline 1.13.1 and above flag every import as
UnusedImports
.It does not flag them when running in standard mode.
Potentially related to Issue #3079
The text was updated successfully, but these errors were encountered: