-
-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(cli/rule): don't report unused suppression comments (#2900)
- Loading branch information
Showing
8 changed files
with
173 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
..._cli/tests/snapshots/main_commands_lint/lint_rule_filter_ignore_suppression_comments.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `check.js` | ||
|
||
```js | ||
|
||
debugger; | ||
// biome-ignore lint/performance/noDelete: <explanation> | ||
delete obj.prop; | ||
|
||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Some errors were emitted while running checks. | ||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
check.js:2:9 lint/suspicious/noDebugger FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× This is an unexpected use of the debugger statement. | ||
> 2 │ debugger; | ||
│ ^^^^^^^^^ | ||
3 │ // biome-ignore lint/performance/noDelete: <explanation> | ||
4 │ delete obj.prop; | ||
i Unsafe fix: Remove debugger statement | ||
1 │ - | ||
2 │ - ········debugger; | ||
1 │ + | ||
3 2 │ // biome-ignore lint/performance/noDelete: <explanation> | ||
4 3 │ delete obj.prop; | ||
``` | ||
|
||
```block | ||
Checked 1 file in <TIME>. No fixes needed. | ||
Found 1 error. | ||
``` |
23 changes: 23 additions & 0 deletions
23
crates/biome_cli/tests/snapshots/main_commands_lint/lint_rule_filter_nursery_group.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `check.js` | ||
|
||
```js | ||
|
||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
flags/invalid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Failed to parse CLI arguments. | ||
Caused by: | ||
couldn't parse `nursery`: The `nursery` group cannot be selected. Select a specific nursery rule instead. | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters