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

Prevent import statements from counting as references for UnusedPrivateProperty #5942

Merged

Conversation

luanpotter
Copy link
Contributor

Fixes #5941

Basically ignore import statements when counting references for the purposes of identifying Unused Private Properties.

Also took the opportunity to improve the previous test package declarations are ignored a bit.

@codecov
Copy link

codecov bot commented Mar 26, 2023

Codecov Report

Merging #5942 (01ca14c) into main (2187667) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #5942   +/-   ##
=========================================
  Coverage     84.48%   84.48%           
  Complexity     3789     3789           
=========================================
  Files           546      546           
  Lines         12935    12937    +2     
  Branches       2273     2275    +2     
=========================================
+ Hits          10928    10930    +2     
  Misses          877      877           
  Partials       1130     1130           
Impacted Files Coverage Δ
...rbosch/detekt/rules/style/UnusedPrivateProperty.kt 93.54% <100.00%> (+0.21%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@BraisGabin BraisGabin added this to the 1.23.0 milestone Mar 27, 2023
@BraisGabin BraisGabin merged commit 1ca2de2 into detekt:main Mar 27, 2023
23 checks passed
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.

UnusedPrivateMember rule counts import declarations as "usage references"
2 participants