Skip to content

Prevent import statements from counting as references for UnusedPrivateProperty#5942

Merged
BraisGabin merged 1 commit into
detekt:mainfrom
luanpotter:luan.unused-private-property-improvements-2
Mar 27, 2023
Merged

Prevent import statements from counting as references for UnusedPrivateProperty#5942
BraisGabin merged 1 commit into
detekt:mainfrom
luanpotter:luan.unused-private-property-improvements-2

Conversation

@luanpotter

Copy link
Copy Markdown
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

codecov Bot commented Mar 26, 2023

Copy link
Copy Markdown

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
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