-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
100 lines (94 loc) · 2.8 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
exclude: |
(?x)(
^mbo/diff/tests/abc_whitespace.*$|
^mbo/diff/tests/numbers_blanks.*|
.*[.]patch
)
- id: trailing-whitespace
exclude: |
(?x)(
^mbo/diff/tests/abc_whitespace.*$|
^mbo/diff/tests/numbers_blanks.*|
.*[.]patch
)
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
- id: actionlint
name: Lint GitHub Actions workflow files
description: Runs actionlint to lint GitHub Actions workflow files
language: golang
types: ["yaml"]
files: ^\.github/workflows/
entry: actionlint
args: ["-shellcheck", ""]
- repo: local
hooks:
- id: mope-uses-external-clang
name: mope-uses-external-clang
description: |
File //mbo/mope/mope.bzl can be configured to find clang-format automatically.
However, the repo version must set `_CLANG_FORMAT_BINARY = ""` so that it uses
the repo provided version which does not work for Bazel module use.
language: pygrep
entry: _CLANG_FORMAT_BINARY\s+=\s+"[^"]+"
files: mbo/mope/mope.bzl
- id: uncomment-bazelmod-includes
name: uncomment-bazelmod-includes
description: |
The repo version of MODULE.bazel may not have commented out includes.
language: pygrep
entry: \s*#\s*include
files: MODULE.bazel
- id: bcr-bazelmod-patch-applies
name: bcr-bazelmod-patch-applies
description: |
The patch in .bcr/patches/bazelmod.patch can be applied
language: system
entry: patch
args: ["-p1", "--dry-run", "-fi", ".bcr/patches/bazelmod.patch"]
pass_filenames: False
types: [text]
- id: github-bazelmod-patch-applies
name: github-bazelmod-patch-applies
description: |
The patch in .github/workflows/bazelmod.patch can be applied
language: system
entry: patch
args: ["-p1", "--dry-run", "-fi", ".github/workflows/bazelmod.patch"]
pass_filenames: False
types: [text]
- id: compare-versions
name: compare-versions
description: |
Compare the versions in CHANGELOG.md and MODULES.bazel.
language: system
entry: .pre-commit/check_version.sh
pass_filenames: False
types: [text]
- repo: https://github.com/keith/pre-commit-buildifier
rev: 8.0.1
hooks:
- id: buildifier
- id: buildifier-lint
args: ["--warnings=all"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.6
hooks:
- id: clang-format
- repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1
hooks:
- id: beautysh
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck