Skip to content

feat(check): hide findings below error from human output in CI - #580

Merged
theCodeDrift merged 1 commit into
mainfrom
check-hide-warnings-in-ci
Oct 24, 2026
Merged

theCodeDrift merged 1 commit into
mainfrom
check-hide-warnings-in-ci

Conversation

@theCodeDrift

Copy link
Copy Markdown
Member

When CI is true or 1, taskless check prints only error-severity findings and ends with a count of what it left out:

1 warning hidden in CI. Pass --include-warnings to show them.

When only warnings matched, it says No errors found. … instead of No issues found., so a run that hid findings cannot read as a clean one. --include-warnings brings them back.

Decisions worth reviewing

  • Output only, rules still run. The issue suggests skipping warn-level rules for speed "if that's cheap", but it also asks for a hidden count, and skipping would lose that. Skipping would also need each ast-grep rule's severity read from YAML, and runtime rules don't declare one ahead of time. Left as a possible follow-up.
  • Everything below error is hidden (warning, info, hint), so CI doesn't hide a warning while still printing a hint.
  • --json is unchanged. Agents read it to confirm a rule fires, and some agent sandboxes set CI. Filtering there would return empty results for a warning rule that matched. The CI recipe uses human output.
  • The exit code was already error-only, so it hasn't changed.

Test config

vite.config.ts now sets CI: "" for the suite. Spawned CLIs inherit the runner's CI=true, and four existing tests that assert on warning text failed under it before this change. The new tests pass CI to the child explicitly. The full suite passes both with and without CI=true locally.

Fixes #568

When CI is true or 1, check prints only error-severity findings and
counts the rest. --include-warnings brings them back. --json and the
exit code are unchanged.
@theCodeDrift
theCodeDrift merged commit fa2ac04 into main Oct 24, 2026
8 checks passed
@theCodeDrift
theCodeDrift deleted the check-hide-warnings-in-ci branch October 24, 2026 00:35
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.

Hide warning output when CI=1, with --include-warnings to bring it back

1 participant