-
Notifications
You must be signed in to change notification settings - Fork 137
/
.pre-commit-config.yaml
85 lines (76 loc) · 2.31 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
default_install_hook_types:
- commit-msg
- pre-commit
- pre-push
repos:
# Generic hooks that apply to a lot of files
- 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-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
# The following only check that the files are parseable and does _not_
# modify the formatting.
- id: check-toml
- id: check-xml
- id: check-yaml
exclude: |
(?x)^(
mkdocs.yml
)$
- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
hooks:
# As above, this only checks for valid JSON files. This implementation
# allows for comments within JSON files.
- id: check-json5
- repo: https://github.com/biomejs/pre-commit
rev: "v0.5.0" # Use the sha / tag you want to point at
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/[email protected]"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
hooks:
- id: ruff
# Exclude python files in pact/** and tests/**, except for the
# files in src/pact/v3/** and tests/v3/**.
exclude: ^(src/pact|tests)/(?!v3/).*\.py$
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
exclude: ^(pact|tests)/(?!v3/).*\.py$
- repo: https://github.com/crate-ci/committed
rev: v1.1.1
hooks:
- id: committed
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
exclude: |
(?x)^(
.github/PULL_REQUEST_TEMPLATE\.md
| CHANGELOG.md
)
- repo: https://github.com/crate-ci/typos
rev: v1.27.3
hooks:
- id: typos
- repo: local
hooks:
# Mypy is difficult to run pre-commit's isolated environment as it needs
# to be able to find dependencies.
- id: mypy
name: mypy
entry: hatch run mypy
language: system
types: [python]
exclude: ^(src/pact|tests|examples|examples/tests)/(?!v3/).*\.py$
stages: [pre-push]