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 Lint/TrailingRescueException #512

Merged
merged 7 commits into from
Nov 30, 2024

Conversation

nobodywasishere
Copy link
Contributor

This prevents the use of Paths as the default value for a trailing exception, and recommends the user use the block rescue instead to be able to filter by exception type.

Closes #242.

@nobodywasishere nobodywasishere marked this pull request as ready for review November 24, 2024 09:19
src/ameba/rule/lint/trailing_rescue_exception.cr Outdated Show resolved Hide resolved
src/ameba/rule/lint/trailing_rescue_exception.cr Outdated Show resolved Hide resolved
spec/ameba/rule/lint/trailing_rescue_exception_spec.cr Outdated Show resolved Hide resolved
src/ameba/rule/lint/trailing_rescue_exception.cr Outdated Show resolved Hide resolved
@Sija Sija added the rule label Nov 24, 2024
@Sija Sija added this to the 1.7.0 milestone Nov 24, 2024
@nobodywasishere nobodywasishere changed the title Add Lint/TrailingRescueException Add Lint/TrailingRescueException Nov 24, 2024
Copy link
Member

@Sija Sija left a comment

Choose a reason for hiding this comment

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

LGTM

@Sija
Copy link
Member

Sija commented Nov 24, 2024

I'm gonna merge it, once v1.6.4 is finalized and released (which should be pretty soon).

@Sija Sija requested a review from veelenga November 25, 2024 00:44
nobodywasishere and others added 6 commits November 27, 2024 11:21
This prevents the use of Paths as the default value for a trailing exception,
and recommends the user use the block rescue instead to be able to filter by exception type
Copy link
Member

@veelenga veelenga left a comment

Choose a reason for hiding this comment

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

LGTM

@Sija Sija merged commit 780b2c6 into crystal-ameba:master Nov 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn on single line rescues with an exception value
3 participants