-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
78 lines (78 loc) · 2.43 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-yaml
- id: check-added-large-files
- id: check-ast
- repo: https://github.com/ambv/black
rev: "19.10b0"
hooks:
- id: black
name: Reformat Python files with the black code formatter
files: '^.*(/PACKAGE)|(\.py)$'
exclude: >-
(?x)^(
exts/.*|
tools/prettify/fprettify/.|
tools/build_utils/fypp|
)$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.26.0
hooks:
- id: markdownlint
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.7.1.1
hooks:
- id: shellcheck
- repo: local
hooks:
- id: doxify
name: Run doxify
entry: ./tools/doxify/doxify.sh
language: script
files: '^src/.*\.(F|f90)$'
- id: prettify
name: Run prettify
entry: ./tools/prettify/prettify.py --no-report-errors
language: script
files: '^src/.*\.(F|f90)$'
exclude: >-
(?x)^(
src/base/base_uses.f90|
src/common/util.F|
)$
- id: check_file_properties
name: Run check_file_properties.py
entry: ./tools/precommit/check_file_properties.py
language: script
files: '^src/.*\.(F|fypp|c|cu|cpp|h|hpp)$'
- id: regen_data
name: Regenerate checked-in data files
entry: make --always-make data
language: system
files: 'data/*'
pass_filenames: false
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format
language: python
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|mm|proto|textproto|vert)$
args: ['-i', '-fallback-style=none', '--style=llvm']
additional_dependencies: ['clang-format']
exclude: >-
(?x)^(
tools/manual/collapsibleList.js|
tools/manual/toggle_folding.js|
)$
- id: shfmt
name: 'Reformat shell scripts with shfmt'
minimum_pre_commit_version: 2.4.0
language: golang
additional_dependencies: [mvdan.cc/sh/v3/cmd/[email protected]]
entry: shfmt
args: ['-i=2', '-ci', '-sr', '-w']
files: '\.sh$'