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

Fix false positives for MultilineLambdaItParameter.kt #3451

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

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

codecov bot commented Feb 7, 2021

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

@chao2zhang
Copy link
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
Member

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

+1. We discussed about it in #2994

@chao2zhang chao2zhang merged commit 899ad5b into detekt:master Feb 9, 2021
@chao2zhang chao2zhang 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