-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
120 lines (107 loc) · 3.22 KB
/
.pre-commit-config.yaml
File metadata and controls
120 lines (107 loc) · 3.22 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
minimum_pre_commit_version: 3.0.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-ast # Simply check whether files parse as valid python.
- repo: local
hooks:
- id: update-doc-stubs
name: Update reference documentation stubs
language: system
entry: python .pre-commit-hooks/ref-doc-stubs.py
files: ^(docs/.*\.md|python/toolr/.*\.py)$
pass_filenames: false
- id: pin-github-actions
name: Pin GitHub Actions to commit SHAs
language: python
entry: python .pre-commit-hooks/pin-github-actions.py
files: ^\.github/workflows/.*\.ya?ml$
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
- id: actionlint
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.23
hooks:
- id: uv-lock
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.13.3"
hooks:
- id: ruff-format
- id: ruff-check
alias: ruff
args:
- --fix
exclude: .pre-commit-hooks/.*\.py
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
name: Run mypy against the code base
files: ^(python/|tests/).*\.py$
exclude: ^tests/support/coverage/.*\.py$
args: []
additional_dependencies:
- attrs
- hypothesis
- msgspec
- pytest
- rich
- rich-argparse
- repo: https://github.com/crate-ci/typos
rev: v1.37.2
hooks:
- id: typos
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args:
- --ignore-words=.codespell.words.ignore
additional_dependencies:
- tomli
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.18.1
hooks:
- id: markdownlint-cli2
args:
- --config=.markdownlint.yaml
- --fix
- repo: local
hooks:
# Does it compile?
- id: cargo-check
name: cargo check
entry: cargo check
language: system
types: [rust]
pass_filenames: false
- id: clippy
name: clippy
entry: cargo clippy --all-targets --all-features -- -D warnings
language: system
types: [rust]
pass_filenames: false
- id: cargo-check
name: cargo check
entry: cargo check --all-targets --all-features
language: system
types: [rust]
pass_filenames: false
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks