forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
72 lines (71 loc) · 1.99 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
default_language_version:
python: python3
repos:
- repo: https://github.com/pycqa/flake8
rev: 3.9.2 # should match major Python version
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==21.11.28
- flake8-comprehensions==3.7.0
- flake8-unused-arguments==0.0.6
- flake8-use-fstring==1.3.0
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/timothycrosley/isort/
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/jendrikseipp/vulture
rev: v2.3
hooks:
- id: vulture
args: ["--ignore-decorators", "@task", "--ignore-names", "test_*,Test*", "tasks"]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.5
hooks:
- id: shellcheck
args: ["--severity=info", "-e", "SC2059", "-e", "SC2028"]
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-beta.5
hooks:
- id: go-fmt
args: [ "-w", "-s" ]
- repo: local
hooks:
- id: revive
name: revive
description: revive
entry: 'python3 tasks/git-hooks/revive.py'
language: system
files: \.go$
- id: govet
name: govet
description: go vet
entry: 'python3 tasks/git-hooks/govet.py'
language: system
require_serial: true
files: \.go$
- id: copyright
name: copyright
description: copyright headers
entry: 'python3 tasks/git-hooks/copyright.py'
language: system
require_serial: true
files: \.go$
- id: win-clang-format
name: win-clang-format
description: clang-format
entry: './tasks/git-hooks/wincpplang.py'
language: system
types_or: [c, c++, c#]
- id: clang-format
name: clang-format
description: clang-format
entry: 'python3 tasks/git-hooks/clang-format.py'
language: system
require_serial: true
files: '^pkg/(ebpf|network|security)/.*\.(c|h)$'
exclude: '^pkg/ebpf/(c/bpf_endian|c/bpf_helpers|compiler/clang-stdarg).h$'