Skip to content

MultilineLambdaItParameter: don't report when lambda has no implicit parameter references#3696

Merged
picklebento merged 2 commits into
detekt:mainfrom
t-kameyama:issue_3570
Apr 25, 2021
Merged

MultilineLambdaItParameter: don't report when lambda has no implicit parameter references#3696
picklebento merged 2 commits into
detekt:mainfrom
t-kameyama:issue_3570

Conversation

@t-kameyama

Copy link
Copy Markdown
Contributor

Fixes #3570

@codecov

codecov Bot commented Apr 23, 2021

Copy link
Copy Markdown

Codecov Report

Merging #3696 (01104e1) into main (9babc59) will increase coverage by 0.04%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3696      +/-   ##
============================================
+ Coverage     78.00%   78.04%   +0.04%     
- Complexity     2870     2883      +13     
============================================
  Files           471      473       +2     
  Lines          9275     9302      +27     
  Branches       1766     1767       +1     
============================================
+ Hits           7235     7260      +25     
  Misses         1078     1078              
- Partials        962      964       +2     
Impacted Files Coverage Δ Complexity Δ
...h/detekt/rules/style/MultilineLambdaItParameter.kt 87.09% <75.00%> (-0.91%) 13.00 <5.00> (+4.00) ⬇️
.../detekt/rules/documentation/EndOfSentenceFormat.kt 95.23% <0.00%> (-0.77%) 12.00% <0.00%> (+2.00%) ⬇️
...h/detekt/rules/documentation/DeprecatedBlockTag.kt 93.75% <0.00%> (ø) 5.00% <0.00%> (?%)
...arturbosch/detekt/rules/documentation/KDocStyle.kt 100.00% <0.00%> (ø) 2.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 9babc59...01104e1. Read the comment docs.

@picklebento

Copy link
Copy Markdown
Member

Code coverage is reporting test coverage miss on https://app.codecov.io/gh/detekt/detekt/compare/3696/diff#D1L118. What scenario will it take to fail the condition getResolvedCall(bindingContext)?.resultingDescriptor == implicitParameter, is it by shadowing the it name with another local variable?

@t-kameyama

Copy link
Copy Markdown
Contributor Author

Yes, I fixed the test. 01104e1

@t-kameyama t-kameyama requested a review from picklebento April 25, 2021 00:59
@picklebento picklebento merged commit 494d5c1 into detekt:main Apr 25, 2021
@t-kameyama t-kameyama deleted the issue_3570 branch April 25, 2021 02:40
@cortinico cortinico added this to the 1.17.0 milestone May 1, 2021
picklebento pushed a commit to picklebento/detekt that referenced this pull request May 13, 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.

MultilineLambdaItParameter should not be triggered when parameter is not used at all

4 participants