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

[refurb] Mark fix as unsafe if there are comments (FURB171) #15832

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

InSyncWithFoo
Copy link
Contributor

Summary

Resolves #10063 and follow-up to #15521.

The fix is now marked as unsafe if there are any comments within its range. Tests are adapted from that of #15521.

Test Plan

cargo nextest run and cargo insta test.

@InSyncWithFoo
Copy link
Contributor Author

This could be made a little better by not checking for comments within the element's range (they are not removed). Is that desired?

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dylwil3 dylwil3 added fixes Related to suggested fixes for violations preview Related to preview mode features labels Jan 30, 2025
Copy link
Collaborator

@dylwil3 dylwil3 left a comment

Choose a reason for hiding this comment

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

LGTM! I don't think we need to worry about the more refined comments intersection check. Thank you!

@dylwil3 dylwil3 merged commit 172f62d into astral-sh:main Jan 30, 2025
21 checks passed
@InSyncWithFoo InSyncWithFoo deleted the FURB171 branch January 30, 2025 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations preview Related to preview mode features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FURB171: Auto-fix deletes comments
2 participants