Skip to content

ci: run the pre-commit hooks as CI's lint job - #49

Merged
tillywoodfield merged 3 commits into
devfrom
ci/24-run-pre-commit-in-ci
Oct 27, 2026
Merged

tillywoodfield merged 3 commits into
devfrom
ci/24-run-pre-commit-in-ci

Conversation

@tillywoodfield

@tillywoodfield tillywoodfield commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

CI's lint job and .pre-commit-config.yaml ran different checks at different versions, so CI never ran codespell, mdformat, actionlint or the hygiene hooks, and a commit never ran sqlfluff. The pre-commit config is now the one definition, and CI runs every hook on every file.

Closes #24

Changes

  • ruff and sqlfluff run as local hooks through uv run, like ty, so all three run at their uv.lock versions. The ruff hooks pass --force-exclude, as the remote ones did.
  • sqlfluff runs on a commit only when it touches dbt/models/. It reads DUCKDB_PATH from .env locally. In CI, UV_NO_ENV_FILE makes uv ignore the missing .env and the job sets DUCKDB_PATH.
  • The lint job runs pre-commit run --all-files --show-diff-on-failure, with the hook environments cached on the config's hash. A hook that rewrites a file fails the job and prints the diff.
  • docs/one/conversion_tables/transformations.md is rewrapped so no line starts with 1999), which mdformat would otherwise escape as 1999\). The file is the provenance's dataTransformationDescription, so the escape would have reached the MCF.
  • b"caf\xe9\n" in tests/dfo/skills/test_assets.py carries # codespell:ignore caf, so codespell no longer rewrites it to calf.

Notes for reviewers

  • Local shellcheck wasn't installed, so actionlint has not yet linted the workflow's run: scripts. On the ubuntu runner it will, so the first CI run is that check.
  • pre-commit autoupdate doesn't touch the local hooks. Their versions move with uv lock --upgrade.

Checklist

  • Addresses one issue, linked above
  • Tests updated where relevant
  • Docs updated where relevant
  • Self-reviewed the diff

🤖 Generated with Claude Code

@tillywoodfield

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T14:30:13.987383Z f854f73 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tillywoodfield

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e24c91af0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
@tillywoodfield

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: f854f73620

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tillywoodfield
tillywoodfield marked this pull request as ready for review October 27, 2026 14:31
@tillywoodfield
tillywoodfield force-pushed the ci/24-run-pre-commit-in-ci branch from f854f73 to a3b5e1e Compare October 27, 2026 14:34
@tillywoodfield
tillywoodfield merged commit dbd7136 into dev Oct 27, 2026
2 checks passed
@tillywoodfield
tillywoodfield deleted the ci/24-run-pre-commit-in-ci branch October 27, 2026 14:37
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.

Run the same static checks in CI and pre-commit

1 participant