03a70e34e83294ba95d2034498e4cd6538e54927
[releng/global-jjb.git] / .pre-commit-config.yaml
1 ---
2 # SPDX-FileCopyrightText: 2017 The Linux Foundation
3 # SPDX-License-Identifier: EPL-1.0
4 repos:
5   - repo: https://github.com/pre-commit/pre-commit-hooks
6     rev: v4.5.0
7     hooks:
8       - id: trailing-whitespace
9       - id: no-commit-to-branch
10         args:
11           - --branch=master
12           - --branch=main
13
14   - repo: https://github.com/pre-commit/mirrors-prettier
15     rev: v4.0.0-alpha.8
16     hooks:
17       - id: prettier
18         stages: [commit]
19
20   - repo: https://github.com/jorisroovers/gitlint
21     rev: v0.19.1
22     hooks:
23       - id: gitlint
24
25   - repo: https://github.com/adrienverge/yamllint.git
26     rev: v1.35.1
27     hooks:
28       - id: yamllint
29
30   - repo: https://github.com/jumanjihouse/pre-commit-hooks
31     rev: 3.0.0
32     hooks:
33       - id: shellcheck
34
35   - repo: https://github.com/btford/write-good
36     rev: v1.0.8
37     hooks:
38       - id: write-good
39         exclude: >
40           (?x)^(
41             docs/jjb/lf-c-cpp-jobs.rst|
42             docs/jjb/lf-ci-jobs.rst|
43             docs/jjb/lf-macros.rst|
44             docs/jjb/lf-python-jobs.rst
45           )$
46
47   - repo: https://github.com/btford/write-good
48     rev: v1.0.8
49     hooks:
50       # Files listed below break the following write-good rules:
51       #   - adverb weakens meaning
52       #   - is wordy or unneeded
53       #
54       # This allows us to place an exception needed to pass the check without
55       # disabling all checks for the whole file. In an ideal world write-good
56       # would give us an override for each individual instance of a violation
57       # but until then this gives us a close enough approach.
58       - id: write-good
59         name: "write-good --no-adverb --no-tooWordy"
60         args: ["--no-adverb", "--no-tooWordy"]
61         files: docs/jjb/lf-ci-jobs.rst
62
63   - repo: https://github.com/btford/write-good
64     rev: v1.0.8
65     hooks:
66       # Files listed below break the following write-good rules:
67       #   - is wordy or unneeded
68       #
69       # This allows us to place an exception needed to pass the check without
70       # disabling all checks for the whole file. In an ideal world write-good
71       # would give us an override for each individual instance of a violation
72       # but until then this gives us a close enough approach.
73       - id: write-good
74         name: "write-good --no-tooWordy"
75         args: ["--no-tooWordy"]
76         files: >
77           (?x)^(
78             docs/jjb/lf-c-cpp-jobs.rst|
79             docs/jjb/lf-macros.rst|
80             docs/jjb/lf-python-jobs.rst
81           )$
82
83   - repo: https://github.com/fsfe/reuse-tool
84     rev: bafd6d7683dec1189d7a477489f6b8770bffc0dd # frozen: v3.0.2
85     hooks:
86       - id: reuse