-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
feat: flag to suppress existing diagnostics #4008
Conversation
I would appreciate a look from a maintainer here to see if I'm on the right track architecturally. I'm not completely sure that I have the right idea. I was following what looks like the strategy for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely take a look at ematipico's comment here: #4007 (comment)
TL;DR from Ema's comment: I wasn't even close on my first attempt. 😄 Circling back. |
Well, it at least works now. 😄 Maintainer questions:
My to-dos:
|
Alright, I think I finally have this ready! Let me know if there are still changes needed (possible I need more tests, wasn't sure what you'd like to see tested). Learned a lot about how Biome works and will handle follow-ups for customizing the explanation once this one lands. Thanks for tolerating my noob questions, @dyc3, @ematipico, and @Conaclos. 😄 |
crates/biome_cli/tests/snapshots/main_cases_suppressions/suppress_only_ok.snap
Show resolved
Hide resolved
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Thanks, @ematipico! Addressed your comments. 👍 |
@ematipico, just checked back in on this PR and had to resolve some conflicts. Is there anything else you need me to do to get merged? I'd love to get started on the custom descriptions but don't want to be working against myself. 😄 |
You don't need to do anything now. Since this is a feature, we need to wait a bit. We're still merging bug fixes. Once we're ready, we'll merge it |
Ah, okay, no worries. Sorry, should've put that together. Would it be wise for me to start trying to work on the custom explanations or should I hold back on that? |
Summary
Working on #4007 to create a flag for writing ignores. This is useful when migrating a large codebase, and you want to enable a rule that has hundreds (thousands?!) of existing violations for that rule. With this feature, you can have Biome ignore those existing violations, and burn them down later.
Test Plan
Some new tests have been written in
crates/biome_cli/tests/cases/suppressions.rs
. Additionally, I've ran this against a large codebase to validate that things work as I'd expect.