Skip to content

Ignore all blocks with comments in EmptyBlock #398

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fourls
Copy link
Collaborator

@fourls fourls commented Jul 24, 2025

Fixes #221.

I considered updating EmptyRoutine and SwallowedException to also ignore all blocks with comments, but I didn't in the end because I decided they had higher-level reasoning than just syntax-level "this block is unnecessary", and so we probably want to forbid those bad patterns regardless of whether there's a comment or not. Happy to hear other views.

@fourls fourls requested a review from cirras July 24, 2025 00:03
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.

Add more exceptions to the EmptyBlock rule
1 participant