/
.pre-commit-config.yaml
79 lines (79 loc) · 2.46 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
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
types: [text]
files: ^(helpers/python|.+\.py)$
exclude: completions/
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
args: [--config=test/setup.cfg]
additional_dependencies: [flake8-bugbear==20.1.4]
types: [text]
files: ^(helpers/python|.+\.py)$
exclude: completions/
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
args: [--settings-path=test/setup.cfg]
types: [text]
files: ^(helpers/python|.+\.py)$
exclude: completions/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.770
hooks:
- id: mypy
args: [--config-file=test/setup.cfg]
# Intentionally not run on helpers/python (support very old versions)
exclude: completions/
- repo: https://github.com/scop/pre-commit-shfmt-workaround
rev: v0
hooks:
- id: shfmt
name: shfmt
language: golang
additional_dependencies: [mvdan.cc/sh/v3/cmd/shfmt@v3.1.1]
entry: shfmt
args: [-w, -s]
types: [text]
files: ^(bash_completion|completions/[^.].*|test/update-test-cmd-list|.+\.sh(\.in)?)$
exclude: ^completions/Makefile*
- repo: https://github.com/ryanrhee/shellcheck-py
rev: v0.7.1.1
hooks:
- id: shellcheck
args: [-f, gcc]
types: [text]
files: ^(bash_completion|completions/.+|test/run*|.+\.sh(\.in)?)$
exclude: completions/(\.gitignore|Makefile.*)$
require_serial: false # We disable SC1090 anyway, so parallel is ok
- repo: https://github.com/perltidy/perltidy
rev: cbb4a687dd331db69219599d84d527397402efdd
hooks:
- id: perltidy
types: [text]
files: ^(helpers/perl|.+\.p[ml])$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.23.0
hooks:
- id: markdownlint
- repo: local
hooks:
- id: perlcritic
name: perlcritic
language: perl
additional_dependencies: [PETDANCE/Perl-Critic-1.138.tar.gz]
entry: perlcritic
args: [--quiet, --verbose, "5"]
types: [text]
files: ^(helpers/perl|.+\.p[ml])$
- 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