Skip to content

FunctionMaxLength false positive for overridden methods #5590#5599

Merged
picklebento merged 1 commit into
detekt:mainfrom
mmorozkov:fix-5590
Dec 11, 2022
Merged

FunctionMaxLength false positive for overridden methods #5590#5599
picklebento merged 1 commit into
detekt:mainfrom
mmorozkov:fix-5590

Conversation

@mmorozkov

Copy link
Copy Markdown
Contributor

By analogy with other naming rules a new ignoreOverridden property with default value true was introduced for following rules:

  • FunctionMaxLength
  • FunctionMinLength
  • VariableMaxLength
  • VariableMinLength

@codecov

codecov Bot commented Dec 3, 2022

Copy link
Copy Markdown

Codecov Report

Merging #5599 (ed15090) into main (8aa1c82) will increase coverage by 85.90%.
The diff coverage is 100.00%.

❗ Current head ed15090 differs from pull request most recent head 9aaa17d. Consider uploading reports for the commit 9aaa17d to get more accurate results

@@             Coverage Diff             @@
##             main    #5599       +/-   ##
===========================================
+ Coverage        0   85.90%   +85.90%     
- Complexity      0     3645     +3645     
===========================================
  Files           0      516      +516     
  Lines           0    12191    +12191     
  Branches        0     2175     +2175     
===========================================
+ Hits            0    10473    +10473     
- Misses          0      628      +628     
- Partials        0     1090     +1090     
Impacted Files Coverage Δ
...rturbosch/detekt/rules/naming/FunctionMaxLength.kt 100.00% <100.00%> (ø)
...rturbosch/detekt/rules/naming/FunctionMinLength.kt 100.00% <100.00%> (ø)
...rturbosch/detekt/rules/naming/VariableMaxLength.kt 100.00% <100.00%> (ø)
...rturbosch/detekt/rules/naming/VariableMinLength.kt 90.47% <100.00%> (ø)
...in/io/gitlab/arturbosch/detekt/api/SplitPattern.kt 100.00% <0.00%> (ø)
...sch/detekt/generator/printer/RuleSetPagePrinter.kt 75.00% <0.00%> (ø)
...lab/arturbosch/detekt/generator/collection/Rule.kt 100.00% <0.00%> (ø)
...wrappers/SpacingBetweenDeclarationsWithComments.kt 100.00% <0.00%> (ø)
...ppers/SpacingBetweenDeclarationsWithAnnotations.kt 100.00% <0.00%> (ø)
...etekt/core/tooling/ProcessingSpecSettingsBridge.kt 93.33% <0.00%> (ø)
... and 510 more

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

@BraisGabin BraisGabin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! LGTM

I see that you copied the description of this parameter from other rules so we should merge this as it is. But probably we could improve the description on other pr. More than function with the override modifier I would call them override functions.

@BraisGabin BraisGabin added this to the 1.23.0 milestone Dec 3, 2022
@BraisGabin

Copy link
Copy Markdown
Member

Fixes #5590

@TWiStErRob

TWiStErRob commented Dec 5, 2022

Copy link
Copy Markdown
Member

@BraisGabin putting "fixes" in a comment, doesn't trigger GitHub to pick it up, it has to be in OP, or manually linked in the sidebar. (I added it manually)

@TWiStErRob TWiStErRob linked an issue Dec 5, 2022 that may be closed by this pull request
Following rules were reworked to always ignore overriden methods/properties:
 - `FunctionMaxLength`
 - `FunctionMinLength`
 - `VariableMaxLength`
 - `VariableMinLength`
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.

FunctionMaxLength false positive for overridden methods

4 participants