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

Add new Lint/DuplicateRescueException cop #8389

Merged
merged 1 commit into from Jul 24, 2020

Conversation

fatkodima
Copy link
Contributor

This cop checks that there are no repeated exceptions used in 'rescue' expressions.

It is an addition to existing similar cops - Lint/DuplicateCaseCondition and Lint/DuplicateElsifCondition

Copy link
Contributor

@marcandre marcandre left a comment

Choose a reason for hiding this comment

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

Great PR.
A few potential improvements

lib/rubocop/cop/lint/duplicate_rescue_exception.rb Outdated Show resolved Hide resolved
lib/rubocop/cop/lint/duplicate_rescue_exception.rb Outdated Show resolved Hide resolved
@fatkodima fatkodima force-pushed the duplicate_rescue_exception-cop branch from ff78447 to 86a865a Compare July 23, 2020 23:58
Copy link
Contributor

@marcandre marcandre left a comment

Choose a reason for hiding this comment

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

Great, good job 👍

@marcandre marcandre merged commit 827d271 into rubocop:master Jul 24, 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.

None yet

2 participants