Skip to content
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 for unused imports #4815

Closed
JcMinarro opened this issue May 6, 2022 · 0 comments · Fixed by #4818
Closed

False positive for unused imports #4815

JcMinarro opened this issue May 6, 2022 · 0 comments · Fixed by #4818
Labels

Comments

@JcMinarro
Copy link

Detekt is reporting Unused Import for Kdocs references.
As you can see in this class the ChannelViewHolder is referenced into the Kdocs comments, but Detekt doesn't parse it properly and thinks there is an unused import

It seems to be reported on #457 and fixed with #458 but it is not working for me

Expected Behavior

Any import that is used on Kdocs shouldn't be reported as an issue

Steps to Reproduce

  • Clone this repo
  • Checkout branch report-detekt-issue
  • Run ./gradlew detekt

The tasks will fail, reporting unused imports, but it is already being used

Your Environment

@JcMinarro JcMinarro added the bug label May 6, 2022
chao2zhang pushed a commit that referenced this issue May 9, 2022
* Handle all kdoc sections in UnusedImports, not just the first one

* Fix NoNameShadowing and UnnecessaryLet violations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant