File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,16 +6,34 @@ cd "$repo_root"
66
77export PATH=" $( go env GOPATH) /bin:$PATH "
88
9- echo " Running format checks..."
9+ echo " Running pre-commit checks..."
10+
11+ # Run format checks
12+ echo " → Running format checks..."
1013make format
1114if ! git diff --quiet; then
12- echo " Formatting changed files. Please review and re-stage:"
15+ echo " Error: Formatting changed files. Please review and re-stage:"
1316 git --no-pager diff --name-only
1417 exit 1
1518fi
1619
17- echo " Running lint checks..."
20+ # Run lint checks
21+ echo " → Running lint checks..."
1822make lint
1923
20- echo " Running short test suite..."
21- go test -short ./...
24+ # Run security scan
25+ echo " → Running security scan..."
26+ if ! make security; then
27+ echo " Error: Security scan failed. Fix security issues before committing."
28+ exit 1
29+ fi
30+
31+ # Run tests
32+ echo " → Running short test suite..."
33+ if ! go test -short ./...; then
34+ echo " Error: Tests failed."
35+ exit 1
36+ fi
37+
38+ echo " All checks passed!"
39+ exit 0
Original file line number Diff line number Diff line change @@ -176,7 +176,6 @@ jobs:
176176 security :
177177 name : Security Scan
178178 runs-on : ubuntu-latest
179- needs : test
180179
181180 steps :
182181 - name : Checkout code
@@ -195,8 +194,5 @@ jobs:
195194 go-version : ' 1.24.x'
196195 cache : true
197196
198- - name : Run govulncheck
199- continue-on-error : true
200- run : |
201- go install golang.org/x/vuln/cmd/govulncheck@latest
202- govulncheck ./...
197+ - name : Run security scan
198+ run : make security
Original file line number Diff line number Diff line change 1- .PHONY : all build build-pure clean test test-pure bench fmt vet lint security checksums version c-lib deps format install-hooks setup
1+ .PHONY : all build build-pure clean test test-pure bench fmt vet lint security checksums version c-lib deps format install-hooks setup check
22
33# Build settings
44BINARY_NAME =cimis
@@ -95,10 +95,16 @@ checksums:
9595version : build
9696 @./$(BUILD_DIR ) /$(BINARY_NAME ) version
9797
98+ # Run all checks (format, vet, lint, test)
99+ .PHONY : check
100+ check : format vet lint test
101+
98102# Download dependencies
103+ .PHONY : deps
99104deps :
100105 $(GO ) mod download
101106 $(GO ) mod tidy
107+ $(GO ) mod verify
102108
103109# Format code (alias for existing fmt)
104110format : fmt
Original file line number Diff line number Diff line change 11# CIMIS CLI Tool
22
3+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/dl-alexandre/cimis-cli )] ( https://goreportcard.com/report/github.com/dl-alexandre/cimis-cli )
4+
35A command-line tool for fetching, storing, and querying California Irrigation Management Information System (CIMIS) weather data.
46
57Built on top of the [ cimis-tsdb] ( https://github.com/dl-alexandre/cimis-tsdb ) high-performance time-series storage library.
You can’t perform that action at this time.
0 commit comments