forked from zeek/spicy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
47 lines (41 loc) · 1.23 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: checkbashisms
name: Check for bashisms in /bin/sh scripts
entry: ./tests/Scripts/3rdparty/checkbashisms.pl
language: script
files: '.*\.sh'
- id: autogen-docs
name: Check that generated documentation is up-to-date
entry: ./doc/scripts/autogen-docs
language: script
pass_filenames: false
- id: clang-format
name: Run clang-format on code
entry: ./scripts/run-clang-format
args: ["--pre-commit-hook"]
files: ^(hilti|spicy|zeek)/.*\.(c|h|C|H|cpp|hpp|cc|hh|c\+\+|h\+\+|cxx|hxx)$
language: script
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: trailing-whitespace
exclude: '^tests/Baseline'
- id: end-of-file-fixer
exclude: '^tests/Baseline|^doc/autogen|^doc/_static'
- id: check-yaml
- id: check-added-large-files
- repo: https://gitlab.com/daverona/pre-commit-cpp
rev: 0.6.0
hooks:
- id: cpplint
exclude: '3rdparty/'
args: ["--quiet"]
- repo: https://github.com/jorisroovers/gitlint
rev: v0.13.1
hooks:
- id: gitlint
exclude: 3rdparty/|doc/.*examples/|/Baseline/|(\.svg$)|(\.dat$)