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

Swallow exception fixes #3525

Merged
merged 2 commits into from
Mar 7, 2021
Merged

Conversation

sschuberth
Copy link
Contributor

What all by default ignored exceptions have in common is that none of
their constructors allows to pass an exception as the cause. Thus, it
does not make sense to complain when these are used in the catch body to
replace the original exception.

Fixes #3524.

What all by default ignored exceptions have in common is that none of
their constructors allows to pass an exception as the cause. Thus, it
does not make sense to complain when these are used in the catch body to
replace the original exception.

Fixes detekt#3524.
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.

Cool, thanks for improving this rule! 🙂
I think a sample or sentence in the rule doc could help to better recall this change.

@codecov
Copy link

codecov bot commented Mar 7, 2021

Codecov Report

Merging #3525 (ba026d4) into master (2fbb7c9) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3525      +/-   ##
============================================
+ Coverage     77.56%   77.57%   +0.01%     
- Complexity     2825     2826       +1     
============================================
  Files           463      463              
  Lines          8745     8746       +1     
  Branches       1703     1704       +1     
============================================
+ Hits           6783     6785       +2     
  Misses         1038     1038              
+ Partials        924      923       -1     
Impacted Files Coverage Δ Complexity Δ
...osch/detekt/rules/exceptions/SwallowedException.kt 77.35% <100.00%> (+2.35%) 19.00 <1.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 2fbb7c9...0461e8e. Read the comment docs.

@sschuberth
Copy link
Contributor Author

I think a sample or sentence in the rule doc could help to better recall this change.

I've anyway filed another ticket for improving the docs, see #3523. Will do that when addressing that issue, too.

@schalkms
Copy link
Member

schalkms commented Mar 7, 2021

@sschuberth good to know. It's okay for me. LGTM!

@sschuberth
Copy link
Contributor Author

sschuberth commented Mar 7, 2021

Will this still make it into 1.16.0 final? (As I believe otherwise more people will come across this issue, as this rule is active by default starting with 1.16.0.)

@schalkms
Copy link
Member

schalkms commented Mar 7, 2021

Will this still make it into 1.16.0 final? (As I believe otherwise more people will come across this issue, as this rule is active by default starting with 1.16.0.)

yes 🙂

@schalkms schalkms merged commit 7c2ff59 into detekt:master Mar 7, 2021
@sschuberth sschuberth deleted the swallow-exception-fixes branch March 7, 2021 20:08
sschuberth added a commit to sschuberth/detekt that referenced this pull request Mar 7, 2021
schalkms pushed a commit that referenced this pull request Mar 7, 2021
@cortinico cortinico added this to the 1.16.0 milestone Mar 8, 2021
@cortinico cortinico added housekeeping Marker for housekeeping tasks and refactorings and removed housekeeping Marker for housekeeping tasks and refactorings labels Mar 8, 2021
This was referenced Mar 11, 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.

SwallowedException: ignore ParseException with version 1.16.0-RC3
4 participants