-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.hookz.yaml
31 lines (31 loc) · 1.17 KB
/
.hookz.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
version: 2.2
hooks:
- type: pre-commit
actions:
- name: "Git Pull (Ensure there are no upstream changes that are not local)"
exec: git
args: ["pull"]
- name: "Update all go dependencies to latest"
exec: go
args: ["get", "-u", "./..."]
- name: "Run gofmt to format the code"
exec: gofmt
args: ["-s", "-w", "*.go"]
- name: "errcheck: Check that errors are checked"
exec: errcheck
args: ["./..."]
- name: "gocyclo: Check cyclomatic complexities"
exec: gocyclo
args: ["."]
- name: "Hinge"
url: https://github.com/devops-kung-fu/hinge/releases/download/v0.1.0/hinge-0.1.0-linux-amd64
args: ["."]
- name: "cyclone-dx: Generate a Software Bill of Materials (SBoM)"
exec: cyclonedx-gomod
args: ["-json", "-output", "sbom.json", "-std", "-licenses"]
- name: "Go Build (Ensure pulled modules do not break the build)"
exec: go
args: ["build", "-v"]
- name: "Add all changed files during the pre-commit stage"
exec: git
args: ["add", "."]