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

Simplify ReturnFromFinally check for finally expressions #3276

Merged
merged 1 commit into from
Dec 12, 2020
Merged

Simplify ReturnFromFinally check for finally expressions #3276

merged 1 commit into from
Dec 12, 2020

Conversation

schalkms
Copy link
Member

@schalkms schalkms commented Dec 11, 2020

The BindingContext does not need to be checked twice whether it is empty.
Visiting both the try block and corresponding finally block is unnecessary,
because the try block can navigate to the finally block.

The BindingContext does not need to checked twice whether it is empty.
Visiting both the try block and corresponding finally block is unnecessary,
because the try block can navigate to the finally block.
@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #3276 (7366b0e) into master (fc5c993) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3276   +/-   ##
=========================================
  Coverage     80.07%   80.08%           
+ Complexity     2653     2652    -1     
=========================================
  Files           443      443           
  Lines          8096     8094    -2     
  Branches       1540     1540           
=========================================
- Hits           6483     6482    -1     
  Misses          789      789           
+ Partials        824      823    -1     
Impacted Files Coverage Δ Complexity Δ
...bosch/detekt/rules/exceptions/ReturnFromFinally.kt 81.48% <100.00%> (+2.17%) 9.00 <0.00> (-1.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 fc5c993...7586d53. Read the comment docs.

@arturbosch arturbosch added this to the 1.15.0 milestone Dec 11, 2020
@arturbosch arturbosch added the housekeeping Marker for housekeeping tasks and refactorings label Dec 11, 2020
@schalkms schalkms merged commit eb1f0e9 into detekt:master Dec 12, 2020
@schalkms schalkms deleted the Refactor_ReturnFromFinally branch December 12, 2020 23:05
arturbosch pushed a commit that referenced this pull request Dec 21, 2020
The BindingContext does not need to be checked twice whether it is empty.
Visiting both the try block and corresponding finally block is unnecessary,
because the try block can navigate to the finally block.
arturbosch pushed a commit that referenced this pull request Jan 16, 2021
The BindingContext does not need to be checked twice whether it is empty.
Visiting both the try block and corresponding finally block is unnecessary,
because the try block can navigate to the finally block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Marker for housekeeping tasks and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants