-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
71 lines (65 loc) · 2.01 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
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# ignore:
# vendor'd code (that has vendor in its path)
# protoc generated golang (*.pb.go)
exclude: vendor|\.pb\.go
repos:
- repo: https://github.com/adrienverge/yamllint
rev: v1.24.2
hooks:
- id: yamllint
args:
- --format=parsable
- --strict
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.0.11
hooks:
- id: yamlfmt
args:
- --mapping=2
- --sequence=4
- --offset=2
- --width=1200 # match .yamllint.yaml; we don't care about line-length.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: detect-private-key
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: mixed-line-ending
- id: pretty-format-json
args:
- --autofix
- id: trailing-whitespace
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.16
hooks:
- id: forbid-binary
# See checks in shellcheck wiki: https://github.com/koalaman/shellcheck/wiki/
- id: shellcheck
- id: shfmt
# do not use these args (yet):
# -s, simplify code
# -mn, minify to reduce its size
args:
- -w # autofix in place
- -d # show diff
- -i=2 # indent 2 spaces
# Example usage of dotnet-format: pre-commit run dotnet-format --all-files
# To restrict to only listed directory add: args: [ path/to/a.csproj, path/to/b.csproj ]
- repo: https://github.com/improbable-eng/pre-commit-plugins/
rev: 0.1.3
hooks:
- id: dotnet-format
args:
- samples/dotnet-hook-samples/Test.csproj