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

Flag unnecessary use of inline ignore directives #591

Open
anderseknert opened this issue Mar 10, 2024 · 1 comment
Open

Flag unnecessary use of inline ignore directives #591

anderseknert opened this issue Mar 10, 2024 · 1 comment
Labels
design enhancement New feature or request

Comments

@anderseknert
Copy link
Member

This likely entails quite some effort for a feature that will go unnoticed by most, so we should prioritize accordingly. But one thing that I'd really like to see Regal do is being able to flag inline ignore directives that aren't needed as the line of code they annotate doesn't violate the rule that is being ignored. This most commonly happens after refactoring, where code has been changed but comments haven't. But there's also a few cases where we've had false positives in our rules, and inline ignore directives have been used to silence those before a fix is shipped... only to be forgotten about later.

@anderseknert anderseknert added enhancement New feature or request design labels Mar 10, 2024
@anderseknert
Copy link
Member Author

Thinking more about it, although probably as a separate issue, would be to flag unnecessary ignores in config too. But that would likely need to entail a new command to do the check, as running all ignored rules in each run adds unnecessary cost to each evaluation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature or request
Projects
Status: TODO
Development

No branches or pull requests

1 participant