Skip to content

Commit 27ebb67

Browse files
committed
Expand .pre-commit-config.yaml with additional hooks, comments, and pre-commit.ci configuration
1 parent 728ba5b commit 27ebb67

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1+
# .pre-commit-config.yaml
2+
#
3+
# Pre-commit configuration for:
4+
# - Local git hooks: `pre-commit install` & `pre-commit run --all-files`
5+
# - pre-commit.ci bot: PR checks, auto hook updates, etc.
6+
#
7+
# Docs: https://pre-commit.ci/
8+
#
9+
ci:
10+
autoupdate_schedule: monthly # Monthly bot PRs to update hook revs
11+
submodules: true # Include git submodules in checks
12+
autofix_commit_msg: |
13+
[pre-commit.ci] auto fixes from pre-commit.com hooks
14+
for more information, see https://pre-commit.ci # Custom commit message for bot autofixes
15+
skip: [~draft, ~WIP] # Skip bot on PRs with these labels (regex prefix match)
16+
117
repos:
218
- repo: https://github.com/pre-commit/pre-commit-hooks
19+
# Basic file checks/fixes: whitespace, EOF, YAML/TOML validation, large files, security, symlinks
320
rev: v6.0.0
421
hooks:
522
- id: trailing-whitespace
@@ -12,24 +29,29 @@ repos:
1229
- id: detect-private-key
1330
- id: check-symlinks
1431
- repo: https://github.com/astral-sh/ruff-pre-commit
32+
# Python linter (ruff --fix) & formatter (ruff-format)
1533
rev: v0.14.10
1634
hooks:
1735
- id: ruff
1836
args: [ --fix ]
1937
- id: ruff-format
2038
- repo: https://github.com/hukkin/mdformat
39+
# Markdown formatter (mdformat)
2140
rev: 1.0.0
2241
hooks:
2342
- id: mdformat
2443
- repo: https://github.com/abravalheri/validate-pyproject
44+
# Validate pyproject.toml schema/content
2545
rev: v0.23
2646
hooks:
2747
- id: validate-pyproject
2848
- repo: https://github.com/tox-dev/pyproject-fmt
49+
# Format pyproject.toml
2950
rev: v2.9.0
3051
hooks:
3152
- id: pyproject-fmt
3253
- repo: https://github.com/codespell-project/codespell
54+
# Spell checker for code, comments, docs
3355
rev: v2.4.1
3456
hooks:
3557
- id: codespell

0 commit comments

Comments
 (0)