Skip to content

False positive for unused imports #4815 - #4818

Merged
picklebento merged 2 commits into
detekt:mainfrom
themkat:GH-4815
May 9, 2022
Merged

picklebento merged 2 commits into
detekt:mainfrom
themkat:GH-4815

Conversation

@themkat

@themkat themkat commented May 7, 2022

Copy link
Copy Markdown
Contributor

Handle all kdoc sections in UnusedImports, not just the first one. The KDoc method getDefaultSection only gets the first section of the KDoc (text before an empty line). This fix now checks all sections/paragraphs of a KDoc instead.

Fixes #4815

@github-actions github-actions Bot added the rules label May 7, 2022
@codecov

codecov Bot commented May 7, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #4818 (5fc74c4) into main (d0d34c1) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #4818      +/-   ##
============================================
+ Coverage     84.71%   84.73%   +0.01%     
  Complexity     3431     3431              
============================================
  Files           491      491              
  Lines         11267    11267              
  Branches       2075     2073       -2     
============================================
+ Hits           9545     9547       +2     
  Misses          673      673              
+ Partials       1049     1047       -2     
Impacted Files Coverage Δ
...lab/arturbosch/detekt/rules/style/UnusedImports.kt 89.87% <100.00%> (+2.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0d34c1...5fc74c4. Read the comment docs.

@cortinico cortinico added this to the 1.21.0 milestone May 9, 2022
@picklebento
picklebento merged commit 463fbf1 into detekt:main May 9, 2022
@themkat
themkat deleted the GH-4815 branch May 9, 2022 09:07

This branch was successfully deployed

1 active deployment
Preview — 5fc74c4e Deployed May 7, 2022 by vercel[bot]
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 this pull request may close these issues.

False positive for unused imports

4 participants