Skip to content

Commit 2f35435

Browse files
committed
the rule json snapshot carries the markdown the command now answers with
`explain rule --output-format json` gained a `markdown` field when the server stopped shelling out for it, and this snapshot still described the answer from before
1 parent beddb9f commit 2f35435

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

crates/ty/tests/cli/rule.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ fn rule_json_output() {
5454
"status": {
5555
"type": "stable",
5656
"since": "0.0.1-alpha.1"
57-
}
57+
},
58+
"markdown": "# invalid-return-type\n\nDefault level: error | Stable (since 0.0.1-alpha.1)\n\n## What it does\n\nDetects returned values that can't be assigned to the function's annotated return type.\n\nNote that the special case of a function with a non-`None` return type and an empty body\nis handled by the separate `empty-body` error code.\n\n## Why is this bad?\n\nReturning an object of a type incompatible with the annotated return type\nis unsound, and will lead to ty inferring incorrect types elsewhere.\n\n## Examples\n\n```python\ndef func() -> int:\n return \"a\" # error: [invalid-return-type]\n```"
5859
}
5960
----- stderr -----
6061
"###);

0 commit comments

Comments
 (0)