forked from scop/bash-completion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
145 lines (129 loc) · 3.79 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
default_stages: [commit]
repos:
- repo: https://github.com/jorisroovers/gitlint
rev: v0.17.0
hooks:
- id: gitlint
stages: [commit-msg]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.4.0-1
hooks:
- id: shfmt-docker
types: [text]
files: ^(bash_completion|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
exclude: ^completions/(\.gitignore|Makefile.*)$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.1
hooks:
- id: shellcheck
args: [-f, gcc]
types: [text]
files: ^(bash_completion|completions/.+|test/(config/bashrc|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
- repo: https://github.com/psf/black
rev: 21.11b1
hooks:
- id: black
types: [text]
files: ^(helpers/python|.+\.py)$
exclude: ^completions/
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
args: [--config=test/setup.cfg]
additional_dependencies:
# Splitting dashes and items on separate lines is intentional,
# enables Renovate's pip_requirements manager to update this file.
-
pycodestyle ==2.8.0
-
pyflakes ==2.4.0
-
flake8-bugbear ==21.4.3
types: [text]
files: ^(helpers/python|.+\.py)$
exclude: ^completions/
- repo: https://github.com/PyCQA/isort
rev: 5.9.3
hooks:
- id: isort
args: [--filter-files, --settings-path=test/setup.cfg]
- repo: local
hooks:
- id: mypy
name: mypy
language: python
additional_dependencies:
-
venv-run ==0.1.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/asottile/pyupgrade
rev: v2.24.0
hooks:
- id: pyupgrade
args: [--py36-plus, --keep-percent-format]
exclude: ^completions/
- repo: https://github.com/perltidy/perltidy
rev: "20210717"
hooks:
- id: perltidy
types: [text]
files: ^(helpers/perl|.+\.p[ml])$
- repo: local
hooks:
- id: perlcritic
name: perlcritic
language: perl
additional_dependencies: [PETDANCE/Perl-Critic-1.140.tar.gz]
entry: perlcritic
args: [--quiet, --verbose, "5"]
types: [text]
files: ^(helpers/perl|.+\.p[ml])$
- repo: https://github.com/jackdewinter/pymarkdown
rev: 0.9.0
hooks:
- id: pymarkdown
entry: pymarkdown
args:
- --config=.pymarkdown.json
- scan
exclude: ^CHANGELOG\.md$
- repo: local
hooks:
- id: asciidoctor
name: asciidoctor
language: docker_image
entry: asciidoctor/docker-asciidoctor:1.15 asciidoctor
args:
- --out-file
- /dev/null
- --failure-level
- WARN
- --doctype
- book
- doc/main.txt
pass_filenames: false
files: ^doc/.*\.txt$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-case-conflict
- repo: https://github.com/crate-ci/typos
rev: v1.0.11
hooks:
- id: typos
exclude: ^(CHANGELOG\.md|test/(test-cmd-list\.txt|fixtures/.+))$