Skip to content

fix: use exit code to determine lint error count in --eval#51

Merged
wittekin merged 1 commit intomainfrom
fix/eval-lint-error-count
Mar 8, 2026
Merged

fix: use exit code to determine lint error count in --eval#51
wittekin merged 1 commit intomainfrom
fix/eval-lint-error-count

Conversation

@wittekin
Copy link
Owner

@wittekin wittekin commented Mar 8, 2026

Summary

millstone --eval was reporting lint: 0.99 (errors=1) on a clean codebase. Root cause: _run_lint() was counting all non-empty output lines as errors when a configured lint_cmd was used. ruff check . (the default Python project command) outputs "All checks passed!" on success — one non-empty line counted as 1 error.

Fix: check exit code first. Exit code 0 → errors=0. Non-zero → count output lines as before.

Test plan

  • millstone --eval now shows lint: 1.00 (errors=0) on clean code
  • All eval-related tests pass (141 tests)
  • Pre-commit hooks pass

🤖 Generated with Claude Code

When a configured lint command runs successfully (exit code 0), treat
error count as 0 regardless of output lines. Previously, informational
output like ruff's "All checks passed!" was counted as 1 error, causing
--eval to show lint: 0.99 even on a clean codebase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wittekin wittekin merged commit d1f6e8a into main Mar 8, 2026
16 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.

1 participant