CI: Update pre-commit checks to latest versions
[releng/global-jjb.git] / .pre-commit-config.yaml
1 ---
2 repos:
3   - repo: https://github.com/pre-commit/pre-commit-hooks
4     rev: v3.4.0
5     hooks:
6       - id: trailing-whitespace
7       - id: no-commit-to-branch
8         args:
9           - --branch=master
10           - --branch=main
11
12   - repo: https://github.com/pre-commit/mirrors-prettier
13     rev: v2.2.1
14     hooks:
15       - id: prettier
16         stages: [commit]
17
18   - repo: https://github.com/jorisroovers/gitlint
19     rev: v0.15.1
20     hooks:
21       - id: gitlint
22
23   - repo: https://github.com/jumanjihouse/pre-commit-hooks
24     rev: 2.1.5
25     hooks:
26       - id: shellcheck
27
28   - repo: https://github.com/btford/write-good
29     rev: v1.0.4
30     hooks:
31       - id: write-good
32         exclude: >
33           (?x)^(
34             docs/jjb/lf-c-cpp-jobs.rst|
35             docs/jjb/lf-ci-jobs.rst|
36             docs/jjb/lf-macros.rst|
37             docs/jjb/lf-python-jobs.rst
38           )$
39
40   - repo: https://github.com/btford/write-good
41     rev: v1.0.4
42     hooks:
43       # Files listed below break the following write-good rules:
44       #   - adverb weakens meaning
45       #   - is wordy or unneeded
46       #
47       # This allows us to place an exception needed to pass the check without
48       # disabling all checks for the whole file. In an ideal world write-good
49       # would give us an override for each individual instance of a violation
50       # but until then this gives us a close enough approach.
51       - id: write-good
52         name: "write-good --no-adverb --no-tooWordy"
53         args: ["--no-adverb", "--no-tooWordy"]
54         files: docs/jjb/lf-ci-jobs.rst
55
56   - repo: https://github.com/btford/write-good
57     rev: v1.0.4
58     hooks:
59       # Files listed below break the following write-good rules:
60       #   - is wordy or unneeded
61       #
62       # This allows us to place an exception needed to pass the check without
63       # disabling all checks for the whole file. In an ideal world write-good
64       # would give us an override for each individual instance of a violation
65       # but until then this gives us a close enough approach.
66       - id: write-good
67         name: "write-good --no-tooWordy"
68         args: ["--no-tooWordy"]
69         files: >
70           (?x)^(
71             docs/jjb/lf-c-cpp-jobs.rst|
72             docs/jjb/lf-macros.rst|
73             docs/jjb/lf-python-jobs.rst
74           )$