Skip to content

Fix false positives for MultilineLambdaItParameter.kt - #3451

Merged
picklebento merged 2 commits into
detekt:masterfrom
picklebento:multilinelambda
Feb 9, 2021
Merged

picklebento merged 2 commits into
detekt:masterfrom
picklebento:multilinelambda

Conversation

@picklebento

Copy link
Copy Markdown
Member

This addresses #3449.

Notes:

  • This rule now requires type-resolution to run in full mode. Without type-resolution, this rule would check only if it is used as explicit parameters.
  • I have updated the tests to cover the scenario with type-resolution and without type-resolution.

@codecov

codecov Bot commented Feb 7, 2021

Copy link
Copy Markdown

Codecov Report

Merging #3451 (0005d53) into master (fab88df) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3451      +/-   ##
============================================
- Coverage     80.28%   80.26%   -0.02%     
- Complexity     2785     2788       +3     
============================================
  Files           454      454              
  Lines          8415     8427      +12     
  Branches       1609     1612       +3     
============================================
+ Hits           6756     6764       +8     
- Misses          787      789       +2     
- Partials        872      874       +2     
Impacted Files Coverage Δ Complexity Δ
...h/detekt/rules/style/MultilineLambdaItParameter.kt 85.71% <80.00%> (-5.96%) 9.00 <2.00> (+3.00) ⬇️
...ain/kotlin/io/github/detekt/metrics/LinesOfCode.kt 87.50% <0.00%> (-5.61%) 0.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 fab88df...0005d53. Read the comment docs.

@BraisGabin

Copy link
Copy Markdown
Member

Do we want more mixed rules? This one is kind of new. Shouldn't we just turn it in a pure type solving rule? The problem with mixed rules are the user expectations. Detekt seems buggy because of the mixed ones.

@picklebento

Copy link
Copy Markdown
Member Author

Do we want more mixed rules? This one is kind of new. Shouldn't we just turn it in a pure type solving rule? The problem with mixed rules are the user expectations. Detekt seems buggy because of the mixed ones.

I remember reading some discussions but couldn't remember the resolution. I can change it to a full type-resolving rule.

@cortinico

Copy link
Copy Markdown
Member

I can change it to a full type-resolving rule.

+1. We discussed about it in #2994

@picklebento
picklebento merged commit 899ad5b into detekt:master Feb 9, 2021
@picklebento
picklebento deleted the multilinelambda branch February 9, 2021 20:07
@cortinico cortinico added this to the 1.16.0 milestone Feb 19, 2021
This was referenced Mar 11, 2021
This was referenced Mar 11, 2021
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.

3 participants