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

UnusedPrivateClass: fix false negative with import directives #2817

Merged
merged 2 commits into from
Jun 23, 2020

Conversation

t-kameyama
Copy link
Contributor

Fixes #2816

@codecov
Copy link

codecov bot commented Jun 22, 2020

Codecov Report

Merging #2817 into master will increase coverage by 0.01%.
The diff coverage is 60.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2817      +/-   ##
============================================
+ Coverage     80.52%   80.54%   +0.01%     
  Complexity     2335     2335              
============================================
  Files           387      387              
  Lines          6993     6994       +1     
  Branches       1269     1269              
============================================
+ Hits           5631     5633       +2     
  Misses          726      726              
+ Partials        636      635       -1     
Impacted Files Coverage Δ Complexity Δ
...rturbosch/detekt/rules/style/UnusedPrivateClass.kt 67.64% <60.00%> (+1.97%) 4.00 <0.00> (ø)

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 82108b7...70bec04. Read the comment docs.

@t-kameyama t-kameyama force-pushed the issue_2816 branch 3 times, most recently from e80095b to 87fe46c Compare June 22, 2020 00:32
@arturbosch arturbosch added this to the 1.10.0 milestone Jun 22, 2020
Copy link
Member

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix 👍

}
"""
val findings = UnusedPrivateClass().lint(code)
assertThat(findings).hasSize(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add also a:
assertThat(findings).hasSourceLocation(xxx, yyy)

This will make sure the rule is reporting the correct occurrence.

@arturbosch arturbosch merged commit ef299a7 into detekt:master Jun 23, 2020
@t-kameyama t-kameyama deleted the issue_2816 branch June 23, 2020 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UnusedPrivateClass: false negative with import directives
4 participants