-
Notifications
You must be signed in to change notification settings - Fork 31
/
.pre-commit-config.yaml
88 lines (88 loc) · 2.15 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
85
86
87
88
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
args:
- --fix=lf
- id: trailing-whitespace
- id: pretty-format-json
args:
- --autofix
- --indent=4
- --no-sort-keys
exclude: cfn/test/data/request.read.invalid.json
- id: check-merge-conflict
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: '6.1.0'
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear>=19.3.0
- flake8-builtins>=1.4.1
- flake8-commas>=2.0.0
- flake8-comprehensions>=2.1.0
- flake8-debugger>=3.1.0
- flake8-pep3101>=1.2.1
exclude: templates/
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-mock-methods
- id: python-no-log-warn
- repo: https://github.com/PyCQA/bandit
rev: "1.7.5"
hooks:
- id: bandit
files: ^python/
additional_dependencies:
- "importlib-metadata<5" # https://github.com/PyCQA/bandit/issues/956
- repo: local
hooks:
- id: pylint-local
name: pylint-local
description: Run pylint in the local virtualenv
entry: pylint "setup.py" "python/" "tests/"
language: system
# ignore all files, run on hard-coded modules instead
pass_filenames: false
always_run: true
- id: pytest-local
name: pytest-local
description: Run pytest in the local virtualenv
entry: >
pytest
--durations=5
"tests/"
language: system
# ignore all files, run on hard-coded modules instead
pass_filenames: false
always_run: true
- id: go-unit-tests
name: go unit tests
entry: go test ./...
pass_filenames: false
types: [go]
language: system
- id: go-build-mod
name: go build mod
entry: go build ./...
pass_filenames: false
types: [go]
language: system
- repo: https://github.com/golangci/golangci-lint
rev: v1.55.2
hooks:
- id: golangci-lint-full