-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 505-sparse-bootstrapping
- Loading branch information
Showing
5 changed files
with
159 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ test_gotest: | |
go clean -testcache | ||
go test -timeout=0 ./... | ||
|
||
.PHONY: static_check | ||
static_check: check_tools | ||
.PHONY: checks | ||
checks: check_tools | ||
@echo Checking correct formatting of files | ||
|
||
@FMTOUT=$$(go fmt ./...); \ | ||
|
@@ -43,6 +43,26 @@ static_check: check_tools | |
echo "$$STATICCHECKOUT";\ | ||
false;\ | ||
fi | ||
|
||
@GOVULNCHECKOUT=$$(govulncheck ./...); \ | ||
if echo "$$GOVULNCHECKOUT" | grep -q "No vulnerabilities found"; then\ | ||
echo "govulncheck: OK";\ | ||
else \ | ||
echo "govulncheck:" >&2;\ | ||
echo "$$GOVULNCHECKOUT" >&2;\ | ||
false;\ | ||
fi | ||
|
||
# gosec rule G115: Is exluded because there are int->uin64 conversions | ||
# and the rule currently contains false positives | ||
@GOSECOUT=$$(gosec -quiet -exclude=G115 ./...); \ | ||
if [ -z "$$GOSECOUT" ]; then\ | ||
echo "gosec: OK (excluding G115)";\ | ||
else \ | ||
echo "gosec: problems in files:";\ | ||
echo "$$GOSECOUT";\ | ||
false;\ | ||
fi | ||
|
||
@echo Checking all local changes are committed | ||
go mod tidy | ||
|
@@ -52,13 +72,15 @@ static_check: check_tools | |
test: test_gotest | ||
|
||
.PHONY: ci_test | ||
ci_test: static_check test_gotest | ||
ci_test: checks test_gotest | ||
|
||
EXECUTABLES = goimports staticcheck | ||
EXECUTABLES = goimports staticcheck govulncheck gosec | ||
.PHONY: get_tools | ||
get_tools: | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
go install honnef.co/go/tools/cmd/[email protected] | ||
go install golang.org/x/vuln/cmd/govulncheck@latest | ||
go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
|
||
.PHONY: check_tools | ||
check_tools: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters