-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
106 lines (95 loc) · 2.92 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Pre-commit configuration for waku
# See https://pre-commit.com for more information
default_install_hook_types: [ pre-commit, pre-push, commit-msg ]
default_stages: [ pre-commit, pre-push, manual ]
repos:
# Meta hooks
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: no-commit-to-branch
args: [ '--branch', 'master' ]
- id: check-yaml
args: [ '--unsafe' ]
files: \.(yaml|yml)$
- id: check-toml
files: \.toml$
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: '^uv\.lock$'
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
- id: detect-private-key
- id: check-illegal-windows-names
- id: mixed-line-ending
args: [ "--fix=lf" ]
- id: check-case-conflict
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.0
hooks:
- id: check-github-workflows
files: ^\.github/workflows/.*\.ya?ml$
- id: check-renovate
files: ^\.github/renovate\.json$
- id: check-taskfile
files: ^Taskfile\.yml$
- repo: https://github.com/rhysd/actionlint
rev: v1.7.6
hooks:
- id: actionlint
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies: [ tomli ]
files: \.(py|pyi|md|yml|yaml|json|toml)$
- repo: local
hooks:
- id: commit-msg
name: check commit message
stages: [ commit-msg ]
language: system
entry: gitlint --msg-filename
fail_fast: true
- id: uv-lock-check
name: uv-lock-check
entry: uv lock --locked
language: system
pass_filenames: false
files: '^pyproject\.toml$'
fail_fast: true
- id: lint
name: Run code linting
entry: task lint -- --output-format=concise
types: [ python ]
language: system
pass_filenames: false
fail_fast: true
stages: [ pre-commit, pre-push, manual ]
- id: typecheck
name: Run type checking
entry: env MYPY_PRETTY=0 task typecheck
types: [ python ]
language: system
pass_filenames: false
fail_fast: true
stages: [ pre-push, manual ] # Run on push only to speed up commits
- id: deptry
name: Check dependency usage
entry: task deptry
language: system
pass_filenames: false
fail_fast: true
stages: [ pre-push, manual ] # Run on push only to speed up commits
- id: security-check
name: Run security checks
entry: task security-audit
language: system
pass_filenames: false
fail_fast: true
stages: [ pre-push, manual ] # Run on push only to speed up commits
verbose: true