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

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

Merged
merged 2 commits into from
Apr 25, 2021

Conversation

t-kameyama
Copy link
Contributor

Fixes #3570

@codecov
Copy link

codecov bot commented Apr 23, 2021

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.

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

Yes, I fixed the test. 01104e1

@chao2zhang chao2zhang 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
chao2zhang pushed a commit to chao2zhang/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