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
false positive unused import #1264
Comments
Thanks for reporting, yep aliases are not yet considered in the rule. Edit: Well, are you sure you used detekt? I just see official sonarqube rules there? |
Yes it is detekt 😉 Click on the issue on sonarcloud, you can see that it has the detekt label. |
I'm still not sure if the report is really from detekt. If sonar-cload uses an old version maybe. But as you see in the PR I used your code and the false positive is not there :O |
It's definitely detekt. I am runnng detekt myself and upload the issues. However, I am using 1.0.0.RC8 and maybe it is fixed by now. That's possible and would be great of course |
Feel free to reopen this ticket if your problem still occurs in RC9.2 or newer. |
Question: do you have to configure detekt in sonarcloud or is it available by default? Thinking about integrating sonarcloud into our CI ^^ |
It's available by default if you use the sonar-scanner. But, you have to run detekt on your own and tell sonar-scanner where the resulting checkstyle files are. See .travis.yml in the above mentioned project |
Thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics. |
Observed Behavior
Real use case including reporting:
https://sonarcloud.io/project/issues?id=robstoll_kbox&open=AWaMMX83Vfn4NtZOwYPB&resolved=false&sinceLeakPeriod=true&types=CODE_SMELL
The alias of the import is used in code. A wild guess: detekt is looking for
forEachRemaining
instead of the alias and does not find it; thus the false positive.Your Environment
The text was updated successfully, but these errors were encountered: