forked from aws-powertools/powertools-lambda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
49 lines (48 loc) · 1.35 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
# 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: v2.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: isort
name: formatting::isort
entry: poetry run isort
language: system
types: [python]
- repo: local
hooks:
- id: flake8
name: linting::flake8
entry: poetry run flake8
language: system
types: [python]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: "11c08644ce6df850480d98f628596446a526cbc6" # frozen: v0.31.1
hooks:
- id: markdownlint
args: ["--fix"]
- repo: local
hooks:
- id: cloudformation
name: linting::cloudformation
entry: poetry run cfn-lint
language: system
types: [yaml]
files: examples/.*
- repo: https://github.com/rhysd/actionlint
rev: v1.6.21
hooks:
- id: actionlint-docker
args: [-pyflakes=]