-
Notifications
You must be signed in to change notification settings - Fork 25
/
.pre-commit-config.yaml
97 lines (97 loc) · 2.87 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
exclude: "dockerfiles|ci_build_images/qpress|cross-reference/crossreference/cr/static/cr/font-awesome"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
name: check yaml files
- id: debug-statements
name: check for Python debug statements
- id: trailing-whitespace
name: check trailing whitespace
args: [--markdown-linebreak-ext=md]
exclude: |
(?x)^(
master-web/templates/home.jade
)$
# - repo: https://gitlab.com/pycqa/flake8.git
# rev: 3.9.2
# hooks:
# - id: flake8
# name: check python (flake8)
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
name: check yaml files (yamllint)
- repo: https://github.com/fauust/pre-commit-shell
rev: v1.1
hooks:
- id: shellcheck
name: check shell script (shellcheck)
args: ["-x"]
# - id: shfmt
# name: check shell style (shfmt)
# args: ["-d", "-i", "2", "-ci"]
- repo: https://github.com/markdownlint/markdownlint
rev: v0.12.0
hooks:
- id: markdownlint
name: check for markdown lint (mdl)
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
name: check for common misspellings in text files
entry: codespell
language: python
- repo: https://github.com/PyCQA/pylint.git
rev: v3.3.1
hooks:
- id: pylint
name: check python syntax (pylint)
entry: pylint
language: system
types: [file]
files: \.(cfg|py|tac)$
# TODO add cross-reference in the future
# exclude: ^cross-reference/.*$
args:
[
"--errors-only",
"-sn", # Don't display the score
"--rcfile=.pylintrc", # Config file
"--disable=django-not-configured", # Silence django warning
]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
name: check python formating (black)
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.16.0
# hooks:
# - id: pyupgrade
# name: check python syntax (pyupgrade)
# args: [--py38-plus]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: check python imports order (isort)
args: ["--profile", "black", "--filter-files"]
- repo: local
hooks:
- id: docker-hadolint
name: Run hadolint with docker
language: docker_image
entry: hadolint/hadolint:latest hadolint
files: Dockerfile