mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-23 11:06:18 +01:00
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
56 lines
2.4 KiB
YAML
56 lines
2.4 KiB
YAML
# Pre-commit hooks for this repo.
|
|
#
|
|
# Created when the shared markdown-naming gate was rolled out. The checks
|
|
# are `language: system` because they are plain bash already on this
|
|
# machine; pre-commit must not build an isolated env for them.
|
|
repos:
|
|
- repo: local
|
|
hooks:
|
|
# Four markdown namespaces (README / CLAUDE* / DOCS* / TODO*), plus the
|
|
# rule that a TODO carries "REMOVE ME AFTER FINISH" and nothing else may.
|
|
# Shared gate in ~/src/utils owns the namespaces and the exemption list, so
|
|
# one repo's idea of a valid name cannot drift from every other repo's.
|
|
- id: md-naming
|
|
name: markdown naming convention
|
|
entry: scripts/check_md_naming.sh
|
|
language: system
|
|
files: \.(md|markdown)$
|
|
|
|
# Shared 250-line cap on every file in the commit, code and prose alike.
|
|
# Checks only what is staged, so an unrelated commit never goes red, and
|
|
# it fails rather than warns: no baseline, no allowlist.
|
|
- id: file-length
|
|
name: files at most 250 lines
|
|
entry: scripts/check_file_length.sh
|
|
language: system
|
|
types: [text]
|
|
|
|
# Every dependency on its ecosystem's newest STABLE release, exact-pinned
|
|
# so the question is mechanically answerable at all.
|
|
#
|
|
# `files:` is what keeps this cheap: a commit touching only source makes
|
|
# ZERO network requests, and manifest commits mostly hit a 6h disk cache.
|
|
#
|
|
# Runs WITHOUT --strict on purpose. Offline it degrades to the cached
|
|
# answer and passes with a loud banner; `--no-verify` is banned here, so
|
|
# a hook that hard-failed on a flaky connection would leave no way to
|
|
# commit at all. CI, always online, is the strict authority.
|
|
- id: dependency-freshness
|
|
name: dependencies on newest stable
|
|
entry: scripts/check_dependency_freshness.sh
|
|
language: system
|
|
pass_filenames: true
|
|
files: >-
|
|
(pubspec\.(yaml|lock)|pyproject\.toml|requirements.*\.txt|uv\.lock
|
|
|package\.json|package-lock\.json|pnpm-lock\.yaml
|
|
|Cargo\.(toml|lock)|go\.(mod|sum)
|
|
|\.fvmrc|\.nvmrc|\.python-version
|
|
|\.github/workflows/.*\.ya?ml)$
|
|
|
|
- id: repo-contract
|
|
name: repo contract (CLAUDE.md Commands + test_changed)
|
|
entry: scripts/check_repo_contract.sh
|
|
language: system
|
|
pass_filenames: false
|
|
files: ^(CLAUDE\.md|AGENTS\.md|scripts/test_changed\.sh)$
|