-
Notifications
You must be signed in to change notification settings - Fork 201
/
.pre-commit-config.yaml
53 lines (53 loc) · 1.34 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
repos:
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.6 # Use the sha / tag you want to point at
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.3.0
hooks:
# Git state
- id: check-merge-conflict
stages: [commit]
- id: check-added-large-files
stages: [commit]
# Sensitive information
- id: detect-private-key
stages: [commit]
- id: detect-aws-credentials
stages: [commit]
args:
- --allow-missing-credentials
# Generic file state
- id: trailing-whitespace
stages: [commit]
- id: mixed-line-ending
stages: [commit]
- id: end-of-file-fixer
stages: [commit]
exclude: .*\.tfvars$ # terraform fmt separates everything with blank lines leaving a trailing line at the end
- id: check-executables-have-shebangs
stages: [commit]
# Language syntax/formatting
- id: check-yaml
stages: [commit]
- id: check-json
stages: [commit]
- id: pretty-format-json
stages: [commit]
args:
- --autofix
- id: flake8
stages: [commit]
args:
- --ignore=F705,E123,E402
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint
stages: [commit]
- repo: https://github.com/mattlqx/pre-commit-sign
rev: v1.1.3
hooks:
- id: sign-commit
stages: [commit-msg]