mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 23:25:14 +00:00
Show syntax errors on the playground (#12083)
## Summary
This PR updates the playground to show syntax errors.
(I forgot to update this and noticed it this morning.)
## Test Plan
Build the playground locally and preview it:
<img width="764" alt="Screenshot 2024-06-28 at 11 03 35"
src="1fd48d6c
-ae41-4672-bf3c-32a61d9946ef">
This commit is contained in:
parent
526efd398a
commit
9fec384d11
3 changed files with 44 additions and 11 deletions
|
@ -39,7 +39,7 @@ export default function SourceEditor({
|
|||
startColumn: diagnostic.location.column,
|
||||
endLineNumber: diagnostic.end_location.row,
|
||||
endColumn: diagnostic.end_location.column,
|
||||
message: `${diagnostic.code}: ${diagnostic.message}`,
|
||||
message: diagnostic.code ? `${diagnostic.code}: ${diagnostic.message}` : diagnostic.message,
|
||||
severity: MarkerSeverity.Error,
|
||||
tags:
|
||||
diagnostic.code === "F401" || diagnostic.code === "F841"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue