Skip to content

BracesOnWhenStatements: fix false positive for necessary braces#6042

Merged
BraisGabin merged 1 commit into
detekt:mainfrom
t-kameyama:issue_6036
Apr 27, 2023
Merged

BracesOnWhenStatements: fix false positive for necessary braces#6042
BraisGabin merged 1 commit into
detekt:mainfrom
t-kameyama:issue_6036

Conversation

@t-kameyama

Copy link
Copy Markdown
Contributor

Fixes #6036
Fixes #6039

@github-actions github-actions Bot added the rules label Apr 25, 2023
@codecov

codecov Bot commented Apr 25, 2023

Copy link
Copy Markdown

Codecov Report

Merging #6042 (4d6ef52) into main (75b7a60) will increase coverage by 0.16%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #6042      +/-   ##
============================================
+ Coverage     84.69%   84.85%   +0.16%     
- Complexity     3865     3949      +84     
============================================
  Files           550      561      +11     
  Lines         13117    13256     +139     
  Branches       2313     2315       +2     
============================================
+ Hits          11109    11248     +139     
  Misses          868      868              
  Partials       1140     1140              
Impacted Files Coverage Δ
...bosch/detekt/rules/style/BracesOnWhenStatements.kt 93.75% <100.00%> (+0.72%) ⬆️

... and 31 files with indirect coverage changes

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

Comment on lines +340 to +341
bool -> { { -> 1 } }
else -> { { -> 2 } }

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.

I didn't know that this was valid Kotlin and that it could be used to disambiguate things like this. Nice!

@BraisGabin BraisGabin merged commit 6881cdd into detekt:main Apr 27, 2023
@t-kameyama t-kameyama deleted the issue_6036 branch April 27, 2023 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

4 participants