-
Notifications
You must be signed in to change notification settings - Fork 382
/
.pre-commit-config.yaml
104 lines (91 loc) · 2.99 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
default_stages: [pre-commit]
minimum_pre_commit_version: 3.2.0 # for "default_stages" names
repos:
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-1
hooks:
- id: shfmt
types: [text]
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fixtures/.+/bin/.+|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$
exclude: ^completions/(\.gitignore|Makefile.*)$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [-f, gcc]
types: [text]
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fixtures/.+/bin/.+|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$
exclude: ^completions/(\.gitignore|Makefile.*)$
require_serial: false # We disable SC1090 anyway, so parallel is ok
- repo: local
hooks:
- id: update-test-cmd-list
name: update-test-cmd-list
language: script
entry: test/update-test-cmd-list
files: ^test/t/.+\.py$
pass_filenames: false
- id: update-test-fallback-links
name: update-test-fallback-links
language: script
entry: test/fallback/update-fallback-links
files: ^completions/_
pass_filenames: false
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
types: [text]
files: ^(helpers/python|.+\.py)$
exclude: ^completions/
- id: ruff-format
types: [text]
files: ^(helpers/python|.+\.py)$
exclude: ^completions/
- repo: local
hooks:
- id: mypy
name: mypy
language: python
additional_dependencies:
- venv-run==0.2.0
entry: venv-run mypy
args: [--config-file=test/setup.cfg]
types: [python]
# Intentionally not run on helpers/python (we support very old versions)
exclude: ^completions/|^test/fixtures/pytest/
- repo: https://github.com/perltidy/perltidy
rev: "20240903"
hooks:
- id: perltidy
types: [text]
files: ^(helpers/perl|.+\.p[ml])$
- repo: https://github.com/scop/pre-commit-perlcritic
rev: v1.144-1
hooks:
- id: perlcritic
args: [--quiet, --verbose, "5"]
types: [text]
files: ^(helpers/perl|.+\.p[ml])$
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.25
hooks:
- id: pymarkdown
entry: pymarkdown
args:
- --config=.pymarkdown.json
- scan
exclude: ^CHANGELOG\.md$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-case-conflict
- repo: https://github.com/crate-ci/typos
rev: v1.27.3
hooks:
- id: typos
exclude: ^(CHANGELOG\.md|test/(test-cmd-list\.txt|fixtures/.+))$