-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.pre-commit-config.yaml
74 lines (68 loc) · 2.14 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
exclude: ^tests/base\.py$
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.9"
hooks:
- id: ruff
args: ["--show-fixes"] # FIXME: add "--exit-zero" to list to commit to ignore ruff fixes
- id: ruff-format
- repo: https://github.com/hukkin/mdformat
rev: 0.7.22 # Use the ref you want to point at
hooks:
- id: mdformat
# Optionally add plugins
additional_dependencies:
- mdformat-gfm
- mdformat-black
- repo: https://github.com/codespell-project/codespell
rev: "v2.4.1"
hooks:
- id: codespell
args: [--toml, pyproject.toml]
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
# for checking C extension code
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
args: ['--style=LLVM', '--verbose']
types_or: [c]
# exclude where code is mostly from upstream source
exclude: '^src/(pval|haplo-stats)/.*'
# FIXME: enable for static C analysis hooks
# - repo: https://github.com/ItsZcx/pre-commit-hooks
# rev: v1.4.0
# hooks:
# - id: cppcheck
# files: \.(c|h)$
# args: ['--enable=style,warning,portability,performance,missingInclude']
# FIXME: enable for debugging hooks
# - repo: meta
# hooks:
# - id: identity
# global excludes for all hooks
exclude: 'tests/data/.*|data/.*|website/reference/.*|src/obsolete/.*|website/html_root/.*'
ci:
autoupdate_commit_msg: 'chore: update pre-commit hooks'