-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
60 lines (57 loc) · 1.71 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.0.0
hooks:
- 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: 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: bazelmod-patch-applies
name: 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]
- 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