You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+24-11Lines changed: 24 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
# REQ.PROJECT: This repository SHOULD include a .pre-commit-config.yaml when quality gates are required.
2
-
# WHY: Provide fast, consistent local checks aligned with CI.
1
+
# REQ.PROJECT: This repository SHOULD include a .pre-commit-config.yaml when quality gates are required.# REQ: Any check that can be run locally MUST be available here.# WHY: Provide fast, consistent local checks aligned with upstream quality gates.# WHY: Keep local checks compatible with repository-wide formatting rules.# OBS: Formatting baselines are defined in# .editorconfig (whitespace/indentation) and# .gitattributes (EOL normalization).# OBS: These hooks do not override .editorconfig or .gitattributes;# they only prevent common diff noise and validate repository metadata.# ALT: Checks that are inherently non-local are handled upstream.# CUSTOM: Keep the hook set minimal and non-destructive for normative Markdown specs.## OPTIONAL LOCAL USAGE (no repo venv required):# Install uv (once, user-level).# uv self update# uvx pre-commit install# uvx pre-commit run --all-files## OBS: If a hook reports "files were modified", re-run last command to confirm a clean pass.## NOTE: pre-commit is optional.# Repositories do not require Python, uv, or pre-commit to clone or commit.exclude: | (?x)^( \.DS_Store| \.ipynb_checkpoints/| \.mypy_cache/| \.pytest_cache/| \.ruff_cache/| \.tox/| \.venv/| build/| dist/| node_modules/| site/ )repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 # OBS: v6 current as of Dec 30 2025 hooks: - id: check-added-large-files # OBS: prevent large binary files - id: trailing-whitespace # OBS: clean trailing whitespace per .editorconfig - id: end-of-file-fixer # OBS: ensure files end with a newline per .gitattributes - id: check-merge-conflict # OBS: prevent committing unresolved merge conflicts # WHY: Workflow files may intentionally include marker-like strings (e.g., >>>>). exclude: ^\.github/workflows/.*\.(yml|yaml)$ - id: check-yaml # OBS: validate YAML syntax files: \.(yml|yaml)$ - repo: https://github.com/adrienverge/yamllint rev: v1.37.1 # OBS: pinned for reproducibility hooks: - id: yamllint # OBS: validate YAML structure and policy (no line-length enforcement) args: [-c, .yamllint.yml] files: \.(yml|yaml)$ - repo: https://github.com/rhysd/actionlint rev: v1.7.10 # OBS: v1.7.10 current as of Dec 30 2025 hooks: - id: actionlint # OBS: validate GitHub Actions workflow syntax files: ^\.github/workflows/.*\.(yml|yaml)$# REQ.PROJECT: This repository SHOULD include a .pre-commit-config.yaml when quality gates are required.
2
+
# REQ: Any check that can be run locally MUST be available here.
3
+
# WHY: Provide fast, consistent local checks aligned with upstream quality gates.
3
4
# WHY: Keep local checks compatible with repository-wide formatting rules.
4
-
# OBS: Formatting baselines are defined in
5
+
# OBS: Formatting baselines are defined in
5
6
# .editorconfig (whitespace/indentation) and
6
7
# .gitattributes (EOL normalization).
7
8
# OBS: These hooks do not override .editorconfig or .gitattributes;
8
-
# they only prevent common diff noise.
9
-
# ALT: CI-only checks are acceptable, but local pre-commit reduces cycle time
10
-
# and prevents avoidable churn.
9
+
# they only prevent common diff noise and validate repository metadata.
10
+
# ALT: Checks that are inherently non-local are handled upstream.
11
11
# CUSTOM: Keep the hook set minimal and non-destructive for normative Markdown specs.
12
12
#
13
13
# OPTIONAL LOCAL USAGE (no repo venv required):
@@ -16,7 +16,9 @@
16
16
# uvx pre-commit install
17
17
# uvx pre-commit run --all-files
18
18
#
19
-
# NOTE: pre-commit is optional.
19
+
# OBS: If a hook reports "files were modified", re-run last command to confirm a clean pass.
20
+
#
21
+
# NOTE: pre-commit is optional.
20
22
# Repositories do not require Python, uv, or pre-commit to clone or commit.
0 commit comments