forked from aws-powertools/powertools-lambda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
53 lines (52 loc) · 1.69 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
# We use poetry to run formatting and linting before commit/push
# Longer checks such as tests, security and complexity baseline
# are run as part of CI to prevent slower feedback loop
# All checks can be run locally via `make pr`
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9" # v4.4.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-toml
- repo: local
hooks:
- id: black
name: formatting::black
entry: poetry run black
language: system
types: [python]
- id: ruff
name: linting-format::ruff
entry: poetry run ruff check
language: system
types: [python]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: "ce0d77ac47dc921b62429804fe763d4d35f66a76" # v0.34.0
hooks:
- id: markdownlint-docker
args: ["--fix"]
- repo: local
hooks:
- id: cloudformation
name: linting::cloudformation
entry: poetry run cfn-lint
language: system
types: [yaml]
exclude: examples/homepage/install/.*?/serverless\.yml$
files: examples/.*
- repo: https://github.com/rhysd/actionlint
rev: "fd7ba3c382e13dcc0248e425b4cbc3f1185fa3ee" # v1.6.24
hooks:
- id: actionlint-docker
args: [-pyflakes=]
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: 3420134c37197c21edffc7e6093b14ffae8402f2 # v1.81.0
hooks:
- id: terraform_fmt
args:
- --args=-recursive
- repo: https://github.com/gitleaks/gitleaks
rev: "7804d652c0460f0b61ea9bb2c1f202bfcdbbf144" # v8.16.3
hooks:
- id: gitleaks