-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
78 lines (78 loc) · 1.99 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: v4.3.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
args:
- --assume-in-merge
- id: check-vcs-permalinks
- id: check-yaml
args: [--allow-multiple-documents]
- id: detect-private-key
# - id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
# - id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
hooks:
- id: check-json5
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.4.0
hooks:
- id: editorconfig-checker
exclude: vscode/.config/Code/User/globalStorage/.*
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.1
hooks:
- id: markdownlint
- repo: https://github.com/hadolint/hadolint
rev: v2.10.0
hooks:
- id: hadolint
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-beta.5
hooks:
- id: golangci-lint-repo-mod
name: golangci-lint
- id: go-mod-tidy
name: go mod tidy
- id: go-build-repo-mod
name: go build
- id: go-test-repo-mod
name: go test
##
## Invoking Custom Go Tools
## - Configured *entirely* through the `args` attribute, ie:
## args: [ go, test, ./... ]
## - Use the `name` attribute to provide better messaging when the hook runs
## - Use the `alias` attribute to be able invoke your hook via `pre-commit run`
##
# - id: my-cmd
# - id: my-cmd-mod
# - id: my-cmd-pkg
# - id: my-cmd-repo
# - id: my-cmd-repo-mod
# - id: my-cmd-repo-pkg
- repo: local
hooks:
- id: syft-grype
name: syft-grype scan
language: script
entry: .github/scripts/syft-grype.sh
args:
- dir:.
pass_filenames: false
ci:
skip:
- hadolint
- golangci-lint-repo-mod
- go-mod-tidy
- go-build-repo-mod
- go-test-repo-mod
- syft-grype