-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
194 lines (184 loc) · 5.16 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
---
default_install_hook_types: [pre-commit, pre-push]
default_stages: [pre-commit, manual]
minimum_pre_commit_version: 3.5.0
fail_fast: true
repos:
- repo: local
# this hook is not intended to be run on github
# it just allows to generate the same pre-commit
# file with some specific option to github
hooks:
- id: preCommitGeneration
name: preCommitGeneration
entry: .github/preCommitGeneration.sh
language: system
pass_filenames: false
always_run: true
require_serial: true
stages: [pre-commit, pre-push, manual]
- repo: https://github.com/executablebooks/mdformat
# Do this before other tools "fixing" the line endings
rev: 0.7.17
hooks:
- id: mdformat
name: Format Markdown
entry: mdformat # Executable to run, with fixed options
language: python
types: [markdown]
args: [--wrap, "80", --number]
additional_dependencies:
- mdformat-toc
- mdformat-shfmt
- mdformat-tables
- mdformat-config
- mdformat-web
- mdformat-gfm
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: mixed-line-ending
- id: end-of-file-fixer
exclude: |
(?x)(
^doc/images/.*\.svg$|
testsData/.*\.result$
)
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-xml
- id: check-merge-conflict
- id: detect-private-key
- id: fix-byte-order-marker
- id: check-yaml
- id: trailing-whitespace
exclude: |
(?x)(
testsData/
)
stages: [pre-commit, pre-push, manual]
- id: check-added-large-files
- id: forbid-new-submodules
- id: mixed-line-ending
args: [--fix=lf]
- id: file-contents-sorter
files: .cspell/.*\.txt
args: [--ignore-case]
stages: [pre-commit, pre-push, manual]
- id: check-json
# x modifier: extended. Spaces and text after a # in the pattern are ignored
exclude: |
(?x)(
.vscode\/.*\.json$
)
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
hooks:
- id: actionlint
stages: [pre-commit, pre-push, manual]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --dictionary
- "-"
- --dictionary
- .cspell/codespellrc-dic.txt
- --ignore-words
- .cspell/codespellrc-ignore.txt
- --quiet-level
- "2"
- --interactive
- "0"
- --check-filenames
- --check-hidden
- --write-changes
exclude: >
(?x)(
^installScripts/|
^bin/|
^install$|
^distro$|
^srcAlt|
^.cspell/codespellrc-.*.txt$
)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: |
(?x)(
\.md$|
\.vscode/.*\.json$|
^\.vscode/.*\.code-snippets$
)
- repo: https://github.com/fchastanet/jumanjihouse-pre-commit-hooks
rev: 3.0.2
hooks:
- id: shfmt
args: [-i, "2", -ci]
# x modifier: extended. Spaces and text after a # in the pattern are ignored
exclude: |
(?x)(
^vendor/|
^bin/|
^manualTests/data/|
/testsData/
)
# Check both committed and uncommitted files for git conflict
# markers and whitespace errors according to core.whitespace
# and conflict-marker-size configuration in a git repo.
- id: git-check
# x modifier: extended. Spaces and text after a # in the pattern are ignored
exclude: |
(?x)(
/testsData/
)
- repo: https://github.com/fchastanet/bash-tools-framework
rev: 6.0.0
hooks:
- id: fixShebangExecutionBit
- id: awkLint
- id: shellcheckLint
- id: shellcheckLintGithubAction
- id: frameworkLint
args:
[
--expected-warnings-count,
"78",
--format,
plain,
--theme,
default-force,
--display-level,
WARNING,
]
- id: frameworkLintGithubAction
args:
[
--expected-warnings-count,
"78",
--format,
checkstyle,
--theme,
default-force,
--display-level,
WARNING,
]
- id: plantuml
args: [--same-dir, -f, png, -f, svg, --limit-size, "900"]
- repo: local
hooks:
- id: buildDocFilesForGithubActions
name: build doc files for github actions
language: script
entry: bin/doc
args: [--verbose, --ci]
pass_filenames: false
require_serial: true
stages: [] # GITHUB
- repo: https://github.com/fchastanet/bash-compiler
rev: v2.0.0
hooks:
- id: buildBashBinaries