-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
.pre-commit-config.yaml
53 lines (48 loc) · 1.51 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
# Don't autoformat autogenerated proto *.pb.c files.
# Don't autoformat third-party libraries
exclude: '\.pb\.|pb2.py|third_party/'
repos:
- repo: https://github.com/RespiraWorks/pre-commit-hooks
rev: 811bd8a6bca330f563c08ce52576c0bdf7d03693
hooks:
- id: clang-format-whole-file
name: clang-format C++
types: [c++]
- id: clang-format-whole-file
name: clang-format C
types: [c]
exclude: ^gui/app/third_party
exclude_types: [c++]
- id: clang-format-whole-file
name: clang-format protobuf
types: [proto]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
# We can specify a Python version below, but this requires everyone to have
# specifically that version available. Given that just getting everyone to
# have py3 was a pain, I want to see if we can leave the version
# unspecified without the formatting diverging between people (which would
# be a pain).
# language_version: python3.7
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: ^pcb/
- id: trailing-whitespace
exclude: ^pcb/
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.0
hooks:
- id: remove-crlf
exclude: \^pcb/
- repo: local
hooks:
- id: c-file-naming
name: C++ sources and headers must be named in snake case (like_this)
entry: C++ sources and headers must be named in snake case (like_this)
language: fail
files: '[A-Z-].*\.(h|cpp|c|py)$'