Skip to content

Commit 5c006ab

Browse files
committed
chore: add pre-commit config (flake8, black, isort, shellcheck, hygiene)
Install locally with: uv run pre-commit install Hooks: - pre-commit-hooks v6.0.0: whitespace, EOL, YAML/JSON validity, large file guard, merge-conflict markers. - flake8 7.3.0 / isort 8.0.1 / black 26.3.1: Python lint and format. - shellcheck v0.11.0 (warning severity): shell script hygiene. Covers: GW-14. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
1 parent 304dddd commit 5c006ab

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.pre-commit-config.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# See https://pre-commit.com for usage.
2+
#
3+
# Install: uv run pre-commit install
4+
# Run all: uv run pre-commit run --all-files
5+
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v6.0.0
9+
hooks:
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
- id: check-yaml
13+
- id: check-json
14+
- id: check-added-large-files
15+
- id: check-merge-conflict
16+
- id: mixed-line-ending
17+
args: ['--fix=lf']
18+
19+
- repo: https://github.com/PyCQA/flake8
20+
rev: 7.3.0
21+
hooks:
22+
- id: flake8
23+
files: ^(cli_audit|tests)/
24+
25+
- repo: https://github.com/PyCQA/isort
26+
rev: 8.0.1
27+
hooks:
28+
- id: isort
29+
files: ^(cli_audit|tests)/
30+
args: ['--profile=black']
31+
32+
- repo: https://github.com/psf/black
33+
rev: 26.3.1
34+
hooks:
35+
- id: black
36+
files: ^(cli_audit|tests)/
37+
38+
- repo: https://github.com/koalaman/shellcheck-precommit
39+
rev: v0.11.0
40+
hooks:
41+
- id: shellcheck
42+
files: ^scripts/.*\.sh$
43+
args: ['--severity=warning']
44+
45+
ci:
46+
autofix_commit_msg: 'chore: pre-commit autofixes'
47+
autoupdate_commit_msg: 'chore(deps): pre-commit autoupdate'

0 commit comments

Comments
 (0)