-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
145 lines (132 loc) · 4.22 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
name: Large Files check
args: ["--maxkb=1024"]
- id: check-merge-conflict
name: Merge Conflict Resolution Check
- id: end-of-file-fixer
name: Newline EOF Checker
- id: fix-byte-order-marker
name: Fix UTF-8 byte order marker
- id: trailing-whitespace
name: Whitespace Cleaning Check
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
- id: shfmt
name: Shell Script Format
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks
name: GitLeaks Checks
- repo: https://github.com/sirosen/fix-smartquotes
rev: 0.2.0
hooks:
- id: fix-smartquotes
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.12.1
hooks:
- id: markdownlint-cli2
name: Markdown Linting
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
name: Dockerfile Lint
#############
# UDS v0.10.4
#############
# TODO: renovate setup
# ZARF PACKAGE CHECK
- repo: local
hooks:
- id: download-schema
name: "Download Zarf Schema"
entry: bash -c 'curl -o zarf.schema.json https://raw.githubusercontent.com/defenseunicorns/uds-cli/v0.10.4/zarf.schema.json'
language: system
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.14.0
hooks:
- id: check-jsonschema
name: "Validate Zarf Configs Against Schema"
files: "zarf.yaml"
types: [yaml]
args: ["--schemafile", "zarf.schema.json"]
- repo: local
hooks:
- id: delete-schema
name: "Delete Zarf Schema"
entry: bash -c 'rm -f zarf.schema.json'
language: system
# UDS BUNDLE CHECK
- repo: local
hooks:
- id: download-schema
name: "Download UDS Bundle Schema"
entry: bash -c 'curl -o uds.schema.json https://raw.githubusercontent.com/defenseunicorns/uds-cli/v0.10.4/uds.schema.json'
language: system
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.14.0
hooks:
- id: check-jsonschema
name: "Validate UDS Bundles Against Schema"
files: "uds-bundle.yaml"
types: [yaml]
args: ["--schemafile", "uds.schema.json"]
- repo: local
hooks:
- id: delete-schema
name: "Delete UDS Bundle Schema"
entry: bash -c 'rm -f uds.schema.json'
language: system
# UDS TASK CHECK
- repo: local
hooks:
- id: download-schema
name: "Download UDS Tasks Schema"
entry: bash -c 'curl -o tasks.schema.json https://raw.githubusercontent.com/defenseunicorns/uds-cli/v0.10.4/tasks.schema.json'
language: system
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.14.0
hooks:
- id: check-jsonschema
name: "Validate UDS Tasks Against Schema"
files: "tasks.yaml"
types: [yaml]
args: ["--schemafile", "tasks.schema.json"]
- id: check-jsonschema
name: "Validate Create Tasks Against Schema"
files: "create.yaml"
types: [yaml]
args: ["--schemafile", "tasks.schema.json"]
- id: check-jsonschema
name: "Validate Publish Tasks Against Schema"
files: "publish.yaml"
types: [yaml]
args: ["--schemafile", "tasks.schema.json"]
- id: check-jsonschema
name: "Validate Deploy Tasks Against Schema"
files: "deploy.yaml"
types: [yaml]
args: ["--schemafile", "tasks.schema.json"]
- id: check-jsonschema
name: "Validate Setup Tasks Against Schema"
files: "setup.yaml"
types: [yaml]
args: ["--schemafile", "tasks.schema.json"]
- id: check-jsonschema
name: "Validate Test Tasks Against Schema"
files: "test.yaml"
types: [yaml]
args: ["--schemafile", "tasks.schema.json"]
- repo: local
hooks:
- id: delete-schema
name: "Delete UDS Tasks Schema"
entry: bash -c 'rm -f tasks.schema.json'
language: system