Skip to content

[UseDataClass] Do not report on inner classes#4344

Merged
cortinico merged 2 commits intodetekt:mainfrom
Aksi0m:fix/use-data-class-rule
Dec 1, 2021
Merged

[UseDataClass] Do not report on inner classes#4344
cortinico merged 2 commits intodetekt:mainfrom
Aksi0m:fix/use-data-class-rule

Conversation

@Aksi0m
Copy link
Copy Markdown
Contributor

@Aksi0m Aksi0m commented Nov 30, 2021

The UseDataClass rule reports to use the data keyword on inner classes. Since data is incompatible with inner this PR fixes the behaviour.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 30, 2021

Codecov Report

Merging #4344 (d4ef406) into main (adcca36) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #4344   +/-   ##
=========================================
  Coverage     84.23%   84.24%           
- Complexity     3259     3262    +3     
=========================================
  Files           474      474           
  Lines         10323    10326    +3     
  Branches       1825     1827    +2     
=========================================
+ Hits           8696     8699    +3     
  Misses          666      666           
  Partials        961      961           
Impacted Files Coverage Δ
...tlab/arturbosch/detekt/rules/style/UseDataClass.kt 78.87% <100.00%> (+0.30%) ⬆️
...gitlab/arturbosch/detekt/rules/style/MayBeConst.kt 81.42% <0.00%> (+0.54%) ⬆️

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 adcca36...d4ef406. Read the comment docs.

@cortinico cortinico changed the title Fix/use data class rule [UseDataClass] Do not report on inner classes Nov 30, 2021
@cortinico cortinico added this to the 1.19.0 milestone Nov 30, 2021
@BraisGabin
Copy link
Copy Markdown
Member

@cortinico is that milestone correct? Shouldn't it be 1.20.0?

@cortinico cortinico modified the milestones: 1.19.0, 1.20.0 Dec 1, 2021
@cortinico
Copy link
Copy Markdown
Member

Shouldn't it be 1.20.0?

Yup my bad. Let me close 1.19.0 👍

@cortinico cortinico merged commit 5e34645 into detekt:main Dec 1, 2021
@Aksi0m Aksi0m deleted the fix/use-data-class-rule branch December 1, 2021 08:33
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.

3 participants