You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: crates/ty/tests/cli/rule.rs
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,8 @@ fn rule_json_output() {
54
54
"status": {
55
55
"type": "stable",
56
56
"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```"
0 commit comments