forked from elastic/cloudbeat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
64 lines (57 loc) · 1.47 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
repos:
## General
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-yaml
args: [--allow-multiple-documents]
exclude: (^tests/deploy/k8s-cloudbeat-tests/templates/.*|dev-tools/packaging/packages.yml)$
- id: check-json
## Security
- id: detect-private-key
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.3.0
hooks:
- id: add-trailing-comma
## Golang hooks
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: golangci-lint
## Python
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: flake8 ./tests/
files: ^tests/
- repo: https://github.com/pycqa/pylint
rev: v2.15.7
hooks:
- id: pylint
args: [
"-rn", # Only display messages
"--rcfile=tests/pylintrc", # Link to your config file
]
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
args: [
--line-length=120,
--check,
--diff,
]
- repo: local
hooks:
- id: mage-config
name: mage config
entry: bash -c 'mage config'
language: system
files: (^_meta\/.*|^cloudbeat.*yml)$
pass_filenames: false