-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
70 lines (68 loc) · 1.91 KB
/
.pre-commit-config.yaml
File metadata and controls
70 lines (68 loc) · 1.91 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
# See https://pre-commit.com for more information
ci:
autofix_prs: false
autoupdate_schedule: quarterly
autoupdate_branch: pre-commit-autoupdate
# Ignore regression files as they should be kept as is
# See https://pre-commit.com/#regular-expressions
exclude: |
(?x)^(
.*/regression/.*
)$
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v5.0.0'
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
args:
- --unsafe
exclude: helm/templates
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: local
hooks:
# Prevent committing .rej files
- id: forbidden-files
name: forbidden files
entry: found Copier update rejection files; review them and remove them
language: fail
files: "\\.rej$"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.14.10'
hooks:
- id: ruff-check
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.22
hooks:
# Update the uv lockfile
- id: uv-lock
- repo: local
hooks:
- id: mypy
name: mypy
entry: "make mypy"
# This uses local uv installation
language: system
types: [ python ]
pass_filenames: false
# use require_serial so that script is only called once per commit
require_serial: true
verbose: false
always_run: false
- repo: https://github.com/citation-file-format/cffconvert
rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c
hooks:
- id: validate-cff