generated from Tom-Notch/Docker-Repository-Template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
100 lines (86 loc) · 3.97 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
98
99
100
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Don't run pre-commit on files under any thirdparty/, third_party/, third-party/, etc. sub-folders
# But will run on directories like third/.../../party/, etc.
exclude: (?i)^(.*third[^/]*party/.*|.*\.ts|.*\.trt)$
repos:
- repo: https://github.com/sirosen/check-jsonschema # check-jsonschema is a github actions and workflows verifier.
rev: 0.29.2
hooks:
- id: check-github-actions
- id: check-github-workflows
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt # pre-commit-hook-yamlfmt is a YAML formatter.
rev: 0.2.3
hooks:
- id: yamlfmt
exclude: (?i)(.*docker-compose.*)$ # by-pass docker-compose since the %YAML 1.2 will break it.
- repo: https://github.com/AleksaC/hadolint-py # hadolint is a Dockerfile linter.
rev: v2.12.1b3
hooks:
- id: hadolint
args:
- -t
- error
- repo: https://github.com/scop/pre-commit-shfmt # pre-commit-shfmt formats shell scripts.
rev: v3.9.0-1
hooks:
- id: shfmt
- repo: https://github.com/shellcheck-py/shellcheck-py # shellcheck-py is a shellcheck wrapper.
rev: v0.10.0.1
hooks:
- id: shellcheck
args:
- -e
- SC1071,SC1091,SC2016
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.13.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/psf/black # The uncompromising Python code formatter.
rev: 24.8.0
hooks:
- id: black
- id: black-jupyter
- repo: https://github.com/pre-commit/mirrors-clang-format # mirrors-clang-format is a clang-format wrapper, it can format json.
rev: v18.1.8
hooks:
- id: clang-format
files: (?i)\.(h|c|hpp|cpp|hxx|cxx|cc|json)$ # enabled json, if prettier is used, should turn off json.
# - repo: https://github.com/pocc/pre-commit-hooks # pre-commit-hooks is a collection of additional pre-commit hooks. Using clang-tidy only for now.
# rev: v1.3.5
# hooks:
# - id: clang-tidy
- repo: https://github.com/cheshirekow/cmake-format-precommit # cmake-format-precommit is a cmake-format wrapper.
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/executablebooks/mdformat # mdformat is a markdown formatter.
rev: 0.7.17
hooks:
- id: mdformat
- repo: https://github.com/jackdewinter/pymarkdown # pymarkdown is a markdown linter.
rev: v0.9.22
hooks:
- id: pymarkdown
args:
- -d
- MD013,MD033
- scan
- repo: https://github.com/pre-commit/pre-commit-hooks # pre-commit-hooks is a collection of additional pre-commit hooks.
rev: v4.6.0
hooks:
- id: requirements-txt-fixer # fixes requirements.txt and requirements-dev.txt.
- id: check-added-large-files # prevents giant files from being committed.
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystem.
- id: check-merge-conflict # checks for files that contain merge conflict strings.
- id: check-yaml # checks yaml files for parseable syntax.
args:
- --allow-multiple-documents
- --unsafe
- id: check-executables-have-shebangs # ensures that (non-binary) executables have a shebang.
- id: check-shebang-scripts-are-executable # ensures that (non-binary) files with a shebang are executable.
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
- id: fix-byte-order-marker # removes utf-8 byte order marker.
- id: mixed-line-ending # replaces or checks mixed line ending.
- id: trailing-whitespace # trims trailing whitespace.