forked from elastic/cloudbeat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
84 lines (75 loc) · 2.05 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
73
74
75
76
77
78
79
80
81
82
83
84
repos:
## General
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
- id: check-yaml
args: [--allow-multiple-documents, --unsafe]
exclude: (^tests/deploy/k8s-cloudbeat-tests/templates/.*)$
- id: check-json
- id: check-executables-have-shebangs
- id: trailing-whitespace
exclude: cloudbeat.reference.yml
## Security
- id: detect-private-key
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
- id: add-trailing-comma
## Golang hooks
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: golangci-lint
## Python
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: flake8 ./tests/ ./fleet_api/
files: ^(tests|deploy/test-environments/fleet_api)/
- 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: 23.3.0
hooks:
- id: black
args: [--line-length=120, --check, --diff]
- repo: local
hooks:
- id: rain
name: format with rain
language: system
entry: rain
args: [
"fmt",
"-w",
]
files: deploy/cloudformation/.*yml
- repo: https://github.com/awslabs/cfn-python-lint
rev: v0.77.5
hooks:
- id: cfn-python-lint
files: deploy/cloudformation/.*.yml
- repo: local
hooks:
- id: mage-config
name: mage config
entry: bash -c 'mage config'
language: system
files: (^_meta\/.*|^cloudbeat.*yml)$
pass_filenames: false
- id: mage-license-headers
name: mage AddLicenseHeaders
entry: bash -c 'mage AddLicenseHeaders'
language: system
files: .*.go
pass_filenames: false