Skip to content

Commit

Permalink
build: Fix ruff regression with code not set for SyntaxError
Browse files Browse the repository at this point in the history
  • Loading branch information
mohkale committed Aug 31, 2024
1 parent 5d46b52 commit ebaae4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/checkers/flymake-collection-ruff.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ See URL `https://github.com/charliermarsh/ruff'."
(car loc)
(cdr loc)
:warning
(concat (propertize .code 'face 'flymake-collection-diag-id) " " .message)))))
(concat (when .code
(concat (propertize .code 'face 'flymake-collection-diag-id) " "))
.message)))))

(provide 'flymake-collection-ruff)

Expand Down
5 changes: 4 additions & 1 deletion tests/checkers/test-cases/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ tests:
lints:
- point: [1, 11]
level: warning
message: "E999 SyntaxError: Simple statements must be separated by newlines or semicolons (ruff)"
message: "SyntaxError: Simple statements must be separated by newlines or semicolons (ruff)"
- point: [1, 18]
level: warning
message: "SyntaxError: Simple statements must be separated by newlines or semicolons (ruff)"

0 comments on commit ebaae4d

Please sign in to comment.