feat: add --fail-on-warnings flag to check command#1
Open
ericsampson wants to merge 2 commits intoampcode:mainfrom
Open
feat: add --fail-on-warnings flag to check command#1ericsampson wants to merge 2 commits intoampcode:mainfrom
ericsampson wants to merge 2 commits intoampcode:mainfrom
Conversation
Add support for the --fail-on-warnings flag that mirrors the behavior of the underlying svelte-check CLI. When this flag is passed to the check command: - If running in daemon mode: exit with code 1 when hasWarnings is true - If running svelte-check directly (fallback): pass --fail-on-warnings to svelte-check This allows CI pipelines to fail on warnings, matching the behavior users expect from svelte-check --fail-on-warnings. Bumps version to 0.1.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2e04a09 to
e2304af
Compare
e2304af to
bb2cee8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--fail-on-warningsflag to thecheckcommand that exits with code 1 when warnings are presentsvelte-check --fail-on-warningsflaghasWarningsstatus and fails if truesvelte-check: passes--fail-on-warningsto the underlying commandMotivation
The
hasWarningsfield was already being tracked by the daemon but wasn't used for exit code logic. This feature allows CI pipelines to enforce warning-free code, matching what users expect fromsvelte-check --fail-on-warnings.Changes
bin/svelte-check-daemon.js: Parse--fail-on-warningsflag and use it in exit code logicsrc/client.ts: Pass--fail-on-warningstosvelte-checkwhen running directlypackage.json: Bump version to 0.1.0Test plan
npm run build)svelte-check-daemon check --fail-on-warningsfails when warnings existsvelte-check-daemon check(without flag) succeeds with warnings