mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-20 11:55:34 +00:00
feat: add snapshot for dead code detection in destructuring patterns
This commit is contained in:
parent
150d399d75
commit
73954135d7
2 changed files with 21 additions and 7 deletions
|
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
source: crates/tinymist-query/src/analysis.rs
|
||||||
|
expression: "JsonRepr::new_redacted(result, &REDACT_LOC)"
|
||||||
|
input_file: crates/tinymist-query/src/fixtures/dead_code/destructuring_dict.typ
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"s0.typ": [
|
||||||
|
{
|
||||||
|
"message": "unused variable: `unused_x`\nHint: consider removing this variable or prefixing with underscore: `_unused_x`",
|
||||||
|
"range": "6:18:6:26",
|
||||||
|
"severity": 2,
|
||||||
|
"source": "typst"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "unused variable: `c2`\nHint: consider removing this variable or prefixing with underscore: `_c2`",
|
||||||
|
"range": "6:37:6:39",
|
||||||
|
"severity": 2,
|
||||||
|
"source": "typst"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
source: crates/tinymist-query/src/analysis.rs
|
|
||||||
assertion_line: 662
|
|
||||||
expression: "JsonRepr::new_redacted(result, &REDACT_LOC)"
|
|
||||||
input_file: crates/tinymist-query/src/fixtures/dead_code/destructuring_dict.typ
|
|
||||||
---
|
|
||||||
{}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue