fix(biome_analyze): stop squashing multiple line suppression comments.#6650
Conversation
FIXME: merging suppression comments still breaks their individual used status
|
ec02e2d to
f10a17d
Compare
f10a17d to
96cd3ce
Compare
CodSpeed Performance ReportMerging #6650 will not alter performanceComparing Summary
|
ematipico
left a comment
There was a problem hiding this comment.
I think this solution is better, because there's a clear function that is charge for resolving overlapped suppresssions. I don't see any regressions, so I think I'm more keen to accept this PR
Can you add the changeset? https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#create-a-changeset
(sorry I only realised now that this fix was the alternative to the other one)
|
Great, thanks! I'll push several more tests and a changeset today. |
Summary
Fixes #6621. Alternative to #6649.
Stop squashing multiple line suppression comments. Squashing has an inconvenient side effect of breaking unused comments check: if any of those comments was used, the whole block was marked as such. This PR removes the comment squashing logic and keeps all inline comments separate.
However, this PR is bigger in scope, and I might not be sufficiently familiar with biome codebase to make the right choice here. Feel free to close if that's the case, #6649 should be enough to patch the immediate hole.
Test Plan
Added a new test category that supports enabling multiple rules inline. Such tests must start with one or more lines of the shape
Added a testfile with multiple inline suppression comments. If the core idea of this PR is approved, I'll add more testcases covering non-jsx sources (that probably shouldn't matter, but there are too few tests for ignore comments, let's add more).