File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Install via pipx `sudo apt install pipx && pipx ensurepath && pipx install pre-commit`
2+ # reload your shell `source ~/.bashrc` and then install via `pre-commit install --hook-type pre-push`.
3+ # This runs basic linting and tests to prevent a failing pipeline
4+ repos :
5+ - repo : local
6+ hooks :
7+ - id : lint-backend
8+ name : Backend Linting
9+ entry : make lint
10+ language : system
11+ pass_filenames : false
12+ always_run : true
13+ stages : [pre-push]
14+
15+ - id : test-backend
16+ name : Backend Tests
17+ entry : make test
18+ language : system
19+ pass_filenames : false
20+ always_run : true
21+ stages : [pre-push]
22+
23+ - id : govulncheck
24+ name : Check for Vulnerabilities
25+ entry : make govulncheck
26+ language : system
27+ pass_filenames : false
28+ always_run : true
29+ stages : [pre-push]
30+
31+ - id : generate-mocks
32+ name : Generate Mocks
33+ entry : bash -c "make generate-code && git diff --exit-code"
34+ language : system
35+ pass_filenames : false
36+ always_run : true
37+ stages : [pre-push]
38+
39+ - id : generate-api-docs
40+ name : Generate API docs
41+ entry : bash -c "make api-docs && git diff --exit-code"
42+ language : system
43+ pass_filenames : false
44+ always_run : true
45+ stages : [pre-push]
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ all: generate-code api-docs lint build test
33SWAG = github.com/swaggo/swag/cmd/swag@v1.16.4
44MOCKERY = github.com/vektra/mockery/v3@v3.5.1
55GOLANGCI-LINT = github.com/golangci/golangci-lint/cmd/golangci-lint@latest
6+ GOVULNCHECK = golang.org/x/vuln/cmd/govulncheck@latest
7+
8+ .PHONY : govulncheck
9+ govulncheck :
10+ go run $(GOVULNCHECK ) ./...
611
712.PHONY : help
813help : # # show this help.
You can’t perform that action at this time.
0 commit comments