-
Notifications
You must be signed in to change notification settings - Fork 18
/
.pre-commit-config.yaml
107 lines (93 loc) · 2.88 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# pre-commit install
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-yaml
args: ["--unsafe"]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
- id: requirements-txt-fixer
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
files: \.(js|ts|jsx|tsx|css|less|html|json|markdown|md|yaml|yml)$
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.26.3
hooks:
- id: check-github-actions
- id: check-github-workflows
- repo: https://github.com/myint/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args:
[
"--exclude",
"lib/context/resources/__init__.py",
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
]
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.9.0
hooks:
- id: black
args: ["lib/"]
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
[
"--exclude=lib/context/resources/__init__.py,lib/config/configuration.py",
"--ignore=E501,W503,W605,E203",
"lib/",
]
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
- id: hadolint
args: ["Dockerfile", "Dockerfile-lambda"]
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.2
hooks:
- id: terraform_fmt
- repo: local
hooks:
- id: pylint
name: pylint
entry: bash -c 'pylint --disable=W,C,R,E -j 0 -rn -sn lib/'
language: system
files: '.*\.py'
# - id: trufflehog
# name: TruffleHog
# description: Detect secrets in your data.
# entry: bash -c 'docker run -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --only-verified --fail'
# language: system
# stages: ["commit", "push"]
- id: bandit
name: bandit
description: "Bandit is a tool for finding common security issues in Python code"
entry: bash -c 'bandit -q -lll -r lib/'
language: system
files: '.*\.py'
- id: safety
name: safety
description: "Safety is a tool that checks your installed dependencies for known security vulnerabilities"
entry: bash -c 'safety check'
language: system
- id: vulture
name: vulture
description: "Vulture finds unused code in Python programs."
entry: bash -c 'vulture --exclude lib/helpers.py --min-confidence 100 lib/'
language: system
files: '.*\.py'