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

InstanceOfCheckForException: do not report when catch blocks do not check for the subtype of an exception #2555

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

t-kameyama
Copy link
Contributor

Fixes #1927

@codecov-io
Copy link

codecov-io commented Mar 30, 2020

Codecov Report

Merging #2555 into master will decrease coverage by 1.74%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2555      +/-   ##
============================================
- Coverage     26.89%   25.14%   -1.75%     
- Complexity      390      392       +2     
============================================
  Files           377      377              
  Lines          6671     7372     +701     
  Branches       1207     1212       +5     
============================================
+ Hits           1794     1854      +60     
- Misses         4746     5387     +641     
  Partials        131      131              
Impacted Files Coverage Δ Complexity Δ
...kt/rules/exceptions/InstanceOfCheckForException.kt 19.04% <0.00%> (-17.32%) 1.00 <0.00> (ø)
...ab/arturbosch/detekt/rules/empty/EmptyInitBlock.kt 33.33% <0.00%> (-16.67%) 1.00% <0.00%> (ø%)
...ch/detekt/rules/empty/EmptySecondaryConstructor.kt 33.33% <0.00%> (-16.67%) 1.00% <0.00%> (ø%)
...t/rules/exceptions/ThrowingExceptionFromFinally.kt 50.00% <0.00%> (-16.67%) 1.00% <0.00%> (ø%)
...tekt/core/processors/ProjectComplexityProcessor.kt 50.00% <0.00%> (-12.50%) 2.00% <0.00%> (ø%)
...sch/detekt/core/processors/KtFileCountProcessor.kt 71.42% <0.00%> (-11.91%) 2.00% <0.00%> (ø%)
...detekt/rules/bugs/ExplicitGarbageCollectionCall.kt 31.25% <0.00%> (-10.42%) 2.00% <0.00%> (ø%)
...itlab/arturbosch/detekt/rules/empty/EmptyBlocks.kt 41.55% <0.00%> (-10.06%) 1.00% <0.00%> (ø%)
...tekt/rules/exceptions/TooGenericExceptionThrown.kt 68.75% <0.00%> (-9.83%) 2.00% <0.00%> (ø%)
...osch/detekt/core/processors/ClassCountProcessor.kt 62.50% <0.00%> (-8.93%) 2.00% <0.00%> (ø%)
... and 257 more

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 21ea090...59c19ed. Read the comment docs.

Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for another nice fix!

@schalkms schalkms merged commit c4329a9 into detekt:master Apr 1, 2020
@t-kameyama t-kameyama deleted the issue_1927 branch April 1, 2020 09:52
@arturbosch arturbosch added this to the 1.7.3 milestone Apr 1, 2020
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.

InstanceOfCheckForException should be ignored for catch blocks that is more than an if expression
4 participants