-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
57 lines (52 loc) · 1.57 KB
/
.pre-commit-config.yaml
File metadata and controls
57 lines (52 loc) · 1.57 KB
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
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.10
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.20.0
hooks:
- id: mypy
additional_dependencies: [boto3-stubs==1.42.88, aws-cdk-lib==2.248.0]
args: [--ignore-missing-imports]
# scripts/generate_openapi.py imports from lambda/app.py (Powertools),
# which conflicts with aws-cdk-lib on `attrs`. The pre-commit mypy env
# holds the CDK side, so scripts/ is checked via `make typecheck`
# inside .venv-lambda instead.
exclude: ^(app\.py|tests/|docs/|scripts/)
- repo: https://github.com/PyCQA/bandit
rev: 1.9.4
hooks:
- id: bandit
args: [-c, .bandit]
- repo: local
hooks:
- id: pylint
name: pylint design checks
entry: pylint
language: system
types: [python]
exclude: ^(tests|docs)/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- repo: local
hooks:
- id: xenon
name: xenon complexity check
entry: xenon --max-absolute B --max-modules A --max-average A lambda/ hello_world/
language: system
types: [python]
pass_filenames: false
- id: pip-audit
name: pip-audit vulnerability scan
entry: pip-audit
language: system
pass_filenames: false
always_run: true