Skip to content

Commit aca083a

Browse files
committed
test(linter/plugins): include stderr output in snapshots (#14155)
Include `stderr` output in test snapshots. This makes sure that the "JS plugins are experimental" warning is not output if user doesn't use JS plugins.
1 parent a3c8f46 commit aca083a

File tree

33 files changed

+170
-3
lines changed

33 files changed

+170
-3
lines changed

apps/oxlint/src/lint.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ impl CliRunner {
239239
if external_plugin_store.is_empty() {
240240
external_linter = None;
241241
} else {
242-
#[cfg(not(any(test, feature = "force_test_reporter")))]
243242
#[expect(clippy::print_stderr)]
244243
{
245244
eprintln!(

apps/oxlint/test/fixtures/basic_custom_plugin/output.snap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
Found 1 warning and 1 error.
2020
Finished in Xms on 1 file using X threads.
2121
```
22+
23+
# stderr
24+
```
25+
WARNING: JS plugins are experimental and not subject to semver.
26+
Breaking changes are possible while JS plugins support is under development.
27+
```

apps/oxlint/test/fixtures/basic_custom_plugin_many_files/output.snap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,9 @@
266266
Found 20 warnings and 20 errors.
267267
Finished in Xms on 20 files using X threads.
268268
```
269+
270+
# stderr
271+
```
272+
WARNING: JS plugins are experimental and not subject to semver.
273+
Breaking changes are possible while JS plugins support is under development.
274+
```

apps/oxlint/test/fixtures/basic_custom_plugin_multiple_rules/output.snap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@
4343
Found 2 warnings and 3 errors.
4444
Finished in Xms on 1 file using X threads.
4545
```
46+
47+
# stderr
48+
```
49+
WARNING: JS plugins are experimental and not subject to semver.
50+
Breaking changes are possible while JS plugins support is under development.
51+
```

apps/oxlint/test/fixtures/basic_custom_plugin_warn_severity/output.snap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
Found 2 warnings and 0 errors.
2020
Finished in Xms on 1 file using X threads.
2121
```
22+
23+
# stderr
24+
```
25+
WARNING: JS plugins are experimental and not subject to semver.
26+
Breaking changes are possible while JS plugins support is under development.
27+
```

apps/oxlint/test/fixtures/built_in_errors/output.snap.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
Found 0 warnings and 1 error.
1414
Finished in Xms on 1 file using X threads.
1515
```
16+
17+
# stderr
18+
```
19+
```

apps/oxlint/test/fixtures/built_in_no_errors/output.snap.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
Found 0 warnings and 0 errors.
77
Finished in Xms on 1 file using X threads.
88
```
9+
10+
# stderr
11+
```
12+
```

apps/oxlint/test/fixtures/context_properties/output.snap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@
4242
Found 0 warnings and 6 errors.
4343
Finished in Xms on 2 files using X threads.
4444
```
45+
46+
# stderr
47+
```
48+
WARNING: JS plugins are experimental and not subject to semver.
49+
Breaking changes are possible while JS plugins support is under development.
50+
```

apps/oxlint/test/fixtures/createOnce/output.snap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,9 @@
258258
Found 0 warnings and 42 errors.
259259
Finished in Xms on 2 files using X threads.
260260
```
261+
262+
# stderr
263+
```
264+
WARNING: JS plugins are experimental and not subject to semver.
265+
Breaking changes are possible while JS plugins support is under development.
266+
```

apps/oxlint/test/fixtures/custom_plugin_disable_directives/output.snap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@
4646
Found 0 warnings and 5 errors.
4747
Finished in Xms on 1 file using X threads.
4848
```
49+
50+
# stderr
51+
```
52+
WARNING: JS plugins are experimental and not subject to semver.
53+
Breaking changes are possible while JS plugins support is under development.
54+
```

0 commit comments

Comments
 (0)