Skip to content

Commit f6f1c5c

Browse files
committed
test(lsp): include fixed content in lsp snapshots (#10744)
1 parent 60347e7 commit f6f1c5c

12 files changed

+28
-8
lines changed

crates/oxc_language_server/src/snapshots/fixtures_linter_astro@debugger.astro.snap

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ related_information[0].location.range: Range { start: Position { line: 1, charac
1212
severity: Some(Warning)
1313
source: Some("oxc")
1414
tags: None
15-
15+
fixed: Some(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 0, character: 1 }, end: Position { line: 1, character: 5 } } })
16+
1617

1718
code: "eslint(no-debugger)"
1819
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
@@ -24,7 +25,8 @@ related_information[0].location.range: Range { start: Position { line: 10, chara
2425
severity: Some(Warning)
2526
source: Some("oxc")
2627
tags: None
27-
28+
fixed: Some(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 0, character: 3 }, end: Position { line: 1, character: 7 } } })
29+
2830

2931
code: "eslint(no-debugger)"
3032
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
@@ -36,7 +38,8 @@ related_information[0].location.range: Range { start: Position { line: 14, chara
3638
severity: Some(Warning)
3739
source: Some("oxc")
3840
tags: None
39-
41+
fixed: Some(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 0, character: 3 }, end: Position { line: 1, character: 7 } } })
42+
4043

4144
code: "eslint(no-debugger)"
4245
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
@@ -48,3 +51,4 @@ related_information[0].location.range: Range { start: Position { line: 18, chara
4851
severity: Some(Warning)
4952
source: Some("oxc")
5053
tags: None
54+
fixed: Some(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 0, character: 3 }, end: Position { line: 1, character: 7 } } })

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module@debugger.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ related_information[0].location.range: Range { start: Position { line: 1, charac
1212
severity: Some(Warning)
1313
source: Some("oxc")
1414
tags: None
15+
fixed: Some(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 9 } } })

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module@dep-a.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ related_information[0].location.range: Range { start: Position { line: 1, charac
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
15+
fixed: None

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module_extended_config@dep-a.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ related_information[0].location.range: Range { start: Position { line: 1, charac
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
15+
fixed: None

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module_nested_config@folder_folder-dep-a.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ related_information[0].location.range: Range { start: Position { line: 1, charac
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
15+
fixed: None

crates/oxc_language_server/src/snapshots/fixtures_linter_deny_no_console@hello_world.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ related_information[0].location.range: Range { start: Position { line: 0, charac
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
15+
fixed: None

crates/oxc_language_server/src/snapshots/fixtures_linter_invalid_syntax@debugger.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ related_information: None
1010
severity: Some(Error)
1111
source: Some("oxc")
1212
tags: None
13+
fixed: None

crates/oxc_language_server/src/snapshots/fixtures_linter_issue_9958@issue.ts.snap

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ related_information[0].location.range: Range { start: Position { line: 3, charac
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
15-
15+
fixed: None
16+
1617

1718
code: "typescript-eslint(no-non-null-asserted-optional-chain)"
1819
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-non-null-asserted-optional-chain.html"
@@ -27,7 +28,8 @@ related_information[1].location.range: Range { start: Position { line: 11, chara
2728
severity: Some(Error)
2829
source: Some("oxc")
2930
tags: None
30-
31+
fixed: Some(FixedContent { message: Some("Delete this code."), code: "", range: Range { start: Position { line: 11, character: 21 }, end: Position { line: 11, character: 22 } } })
32+
3133

3234
code: "None"
3335
code_description.href: "None"
@@ -39,3 +41,4 @@ related_information[0].location.range: Range { start: Position { line: 11, chara
3941
severity: Some(Hint)
4042
source: Some("oxc")
4143
tags: None
44+
fixed: None

crates/oxc_language_server/src/snapshots/fixtures_linter_regexp_feature@index.ts.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ related_information[0].location.range: Range { start: Position { line: 1, charac
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
15-
15+
fixed: None
16+
1617

1718
code: "eslint(no-useless-escape)"
1819
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-useless-escape.html"
@@ -24,3 +25,4 @@ related_information[0].location.range: Range { start: Position { line: 0, charac
2425
severity: Some(Error)
2526
source: Some("oxc")
2627
tags: None
28+
fixed: Some(FixedContent { message: Some("Replace `\\/` with `/`."), code: "/", range: Range { start: Position { line: 0, character: 16 }, end: Position { line: 0, character: 18 } } })

crates/oxc_language_server/src/snapshots/fixtures_linter_svelte@debugger.svelte.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ related_information[0].location.range: Range { start: Position { line: 1, charac
1212
severity: Some(Warning)
1313
source: Some("oxc")
1414
tags: None
15+
fixed: Some(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 0, character: 2 }, end: Position { line: 1, character: 2 } } })

0 commit comments

Comments
 (0)