Skip to content

Fix --check mode to exit non-zero on syntax errors#797

Merged
fables-tales merged 2 commits intotrunkfrom
fable-fix-check-exit-code
Jan 17, 2026
Merged

Fix --check mode to exit non-zero on syntax errors#797
fables-tales merged 2 commits intotrunkfrom
fable-fix-check-exit-code

Conversation

@fables-tales
Copy link
Owner

Previously, --check would exit with code 0 even when syntax errors were encountered in input files. This changes the check mode to track errors and exit with code 1 (SyntaxError) when any syntax errors occur.

Also adds tests for --check with syntax errors for both file and stdin input.

fables-tales and others added 2 commits January 17, 2026 16:44
Previously, --check would exit with code 0 even when syntax errors were
encountered in input files. This changes the check mode to track errors
and exit with code 1 (SyntaxError) when any syntax errors occur.

Also adds tests for --check with syntax errors for both file and stdin input.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fables-tales fables-tales force-pushed the fable-fix-check-exit-code branch from 5bf8231 to c45c8de Compare January 17, 2026 21:46
@fables-tales fables-tales requested a review from reese January 17, 2026 21:46
@reese reese linked an issue Jan 17, 2026 that may be closed by this pull request
@fables-tales
Copy link
Owner Author

fixes: #451

@fables-tales fables-tales merged commit 766d123 into trunk Jan 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--check [FILE] returns 0 exit code for invalid syntax

2 participants