This commit is contained in:
Hong Jiarong 2025-12-20 16:07:04 +08:00
parent 06da3f8f25
commit 815aea1bf2
6 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,5 @@
#let f() = {
set text(red)
return
}

View file

@ -0,0 +1,5 @@
#let f() = {
show: it => it
return
}

View file

@ -0,0 +1,5 @@
#let f() = {
[1]
return
}

View file

@ -0,0 +1,15 @@
---
source: crates/tinymist-query/src/analysis.rs
expression: "JsonRepr::new_redacted(result, &REDACT_LOC)"
input_file: crates/tinymist-query/src/fixtures/lint/discard_return_none_set.typ
---
{
"s0.typ": [
{
"message": "This `set` expression is implicitly discarded by function return",
"range": "1:2:1:15",
"severity": 2,
"source": "typst"
}
]
}

View file

@ -0,0 +1,15 @@
---
source: crates/tinymist-query/src/analysis.rs
expression: "JsonRepr::new_redacted(result, &REDACT_LOC)"
input_file: crates/tinymist-query/src/fixtures/lint/discard_return_none_show.typ
---
{
"s0.typ": [
{
"message": "This `show` expression is implicitly discarded by function return",
"range": "1:2:1:16",
"severity": 2,
"source": "typst"
}
]
}

View file

@ -0,0 +1,6 @@
---
source: crates/tinymist-query/src/analysis.rs
expression: "JsonRepr::new_redacted(result, &REDACT_LOC)"
input_file: crates/tinymist-query/src/fixtures/lint/discard_return_none_text.typ
---
{}