Skip to content

ci: enforce pre-commit formatting hooks in CI#99

Merged
dguido merged 3 commits intomainfrom
ci/enforce-pre-commit-hooks
Feb 18, 2026
Merged

ci: enforce pre-commit formatting hooks in CI#99
dguido merged 3 commits intomainfrom
ci/enforce-pre-commit-hooks

Conversation

@dguido
Copy link
Copy Markdown
Member

@dguido dguido commented Feb 18, 2026

Summary

  • Add a pre-commit-hooks job to lint.yml that runs check-yaml, check-json, end-of-file-fixer, and trailing-whitespace on every PR
  • Uses pre-commit/action so the CI job stays in sync with .pre-commit-config.yaml automatically

These four hooks previously only ran locally via pre-commit. Contributors who didn't install pre-commit could introduce formatting drift — see #97 for an example where 27 files needed cleanup.

Test plan

  • actionlint passes
  • zizmor passes (no security findings)
  • CI runs the new job on this PR

🤖 Generated with Claude Code

dguido and others added 3 commits February 18, 2026 10:11
check-yaml, check-json, end-of-file-fixer, and trailing-whitespace
only ran locally via pre-commit. Contributors who skip pre-commit
can introduce formatting drift (see #97). Add a CI job using
pre-commit/action to enforce these four hooks on every PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run all pre-commit hooks (ruff, shellcheck, shfmt, check-yaml,
check-json, end-of-file-fixer, trailing-whitespace) in one job
instead of separate CI jobs per tool. Fixes the extra_args error
where pre-commit run only accepts one hook ID positionally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pre-commit hooks caught two files missed by the earlier formatting
PR: trailing blank line in quick-reference.md and trailing
whitespace plus missing final newline in workflow.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dguido dguido requested a review from ahpaleus as a code owner February 18, 2026 17:16
@dguido dguido merged commit 224f517 into main Feb 18, 2026
6 checks passed
@dguido dguido deleted the ci/enforce-pre-commit-hooks branch February 18, 2026 17:20
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