-
Notifications
You must be signed in to change notification settings - Fork 8
/
.pre-commit-config.yaml
64 lines (62 loc) · 1.63 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
---
default_language_version:
# force all unspecified python hooks to run python3
python: python3
exclude: node|help_templates|assets|ptportal/static
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
# exclude because cannot customize .svg XML
exclude: ptportal/static/
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
exclude: docker/prod/nginx/ssl/selfsigned.key
- id: end-of-file-fixer
exclude: files/(issue|motd)
- id: mixed-line-ending
args:
- --fix=lf
- id: pretty-format-json
args:
- --autofix
- id: requirements-txt-fixer
- id: trailing-whitespace
# Text file hooks
- repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1
hooks:
- id: beautysh
args:
- --indent-size
- '2'
- repo: https://github.com/detailyang/pre-commit-shell
rev: 1.0.5
hooks:
- id: shell-lint
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
args:
- --skip-string-normalization
exclude: ptportal/tests
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
args:
- --strict
# Docker hooks
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.0.1
hooks:
- id: docker-compose-check