Skip to content

chore: add pre-commit hooks and apply formatting - #68

Merged
max-sixty merged 4 commits into
mainfrom
tasks
Mar 26, 2026
Merged

max-sixty merged 4 commits into
mainfrom
tasks

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Adds .pre-commit-config.yaml at the repo root — the only new root file. Python hooks (ruff, uv-lock) are scoped to generator/ via --directory and files: patterns.

Hooks: trailing-whitespace, end-of-file-fixer, check-yaml, ruff-check, ruff-format, uv-lock, typos, actionlint.

The uv-lock hook catches the stale lock file issue (pyproject.toml version bumps without re-locking). uv lock --check doesn't catch this because it only validates dependency resolution, not project version metadata.

Also fixes: unused variable in a test, ruff formatting across all Python files, stale uv.lock.

This was written by Claude Code on behalf of @max-sixty

max-sixty and others added 3 commits March 25, 2026 16:58
The bot now distinguishes "helping" (anyone can ask — investigating bugs, creating issues/PRs, answering questions) from "directing" (closing issues, dismissing reviews, reverting — requires maintainer access via author_association check).

Guidance lives in two layers: a compact reinforcement in system_prompt_append (trusted, from workflow YAML on pull_request_target) and the full explanation in the running-in-ci skill. Scope is limited to the current repo and organization, with an escape hatch for repos that explicitly welcome AI-created issues.

Co-Authored-By: Claude <[email protected]>
Adds .pre-commit-config.yaml with trailing-whitespace, end-of-file-fixer, check-yaml, ruff-check, ruff-format, uv-lock, typos, and actionlint. Python hooks scoped to generator/ via --directory and files patterns.

Fixes: unused variable in test_config_edge_cases.py, ruff formatting across all Python files, stale uv.lock (version 0.0.1 -> 0.0.2).

Co-Authored-By: Claude <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CLAUDE.md says "No pre-commit or linter configured" — now outdated after this PR. Worth updating that line to reflect the new setup.

@max-sixty
max-sixty merged commit 0dfc589 into main Mar 26, 2026
2 checks passed
@max-sixty
max-sixty deleted the tasks branch March 26, 2026 01:05
tend-agent added a commit that referenced this pull request Mar 26, 2026
The `.pre-commit-config.yaml` added in #68 (ruff, typos, actionlint,
uv-lock) only runs locally. PRs can pass CI with linting violations.
Add a `lint` job using `pre-commit/action` so CI enforces the same checks.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.

2 participants