Skip to content

ci: annotate ruff findings on the PR and name the steps - #31

Merged
SeanathanVT merged 1 commit into
developmentfrom
ci/annotate-lint
Oct 30, 2026
Merged

SeanathanVT merged 1 commit into
developmentfrom
ci/annotate-lint

Conversation

@SeanathanVT

Copy link
Copy Markdown
Owner

Summary

#30 failed GitHub CI, and the PR's Checks tab showed only "Process completed with exit code 1". The actual ruff findings were only in the job log, which needs a GitHub login to read. This PR puts lint failures where they're seen and names each step, so it's obvious which one failed.

Changes

  • Lint (ruff): runs ruff check . --output-format=github. Each finding becomes an error annotation on its line in the PR's Files changed tab and in the check summary, with the rule, the message and the suggested fix. Example: FURB167 Use of regular expression alias re.S — help: Replace with re.DOTALL. Ruff still exits 1, so the job still fails.
  • Named steps: "Install dependencies", "Lint (ruff)" and "Tests" replace the unnamed run: steps.
  • Tests: pytest gets -ra, which ends the run with a one-line reason for each failure, error or skip.
  • AGENTS.md (Testing): before handing over any change, run every step CI runs, ruff check . included, not just the tests. The lint failure in Ledger interface redesign (ROADMAP 3.21) #30 got through because only pytest was run locally.

GitLab CI is unchanged. Its job log already prints ruff's full output, and merge requests show that log directly.

Verification

  • ruff check --output-format=github with the pinned ruff 0.16.10 prints ::error annotations with file, line, column and the fix hint, and exits 1.
  • The workflow YAML parses.
  • This PR's own CI run is the live check: the steps should appear by name, and a clean run means no annotations.

🤖 Generated with Claude Code

- ruff --output-format=github turns each finding into a line annotation
- Name the install, lint and test steps; pytest -ra adds a short failure summary
- AGENTS.md: run every CI step, ruff included, before handing over

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cd tmp/ci-branch
@SeanathanVT
SeanathanVT merged commit d2f306e into development Oct 30, 2026
2 checks passed
@SeanathanVT
SeanathanVT deleted the ci/annotate-lint branch October 30, 2026 18:34
@SeanathanVT SeanathanVT mentioned this pull request Oct 30, 2026
SeanathanVT added a commit that referenced this pull request Oct 30, 2026
- ruff --output-format=github turns each finding into a line annotation
- Name the install, lint and test steps; pytest -ra adds a short failure summary
- AGENTS.md: run every CI step, ruff included, before handing over


cd tmp/ci-branch

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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