mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-04-08 22:45:55 +02:00
Add vet and staticcheck make targets
This commit is contained in:
parent
7902279750
commit
4d8adc8c87
11
Makefile
11
Makefile
@ -26,3 +26,14 @@ fmt:
|
|||||||
go fmt $(GOSRC_APP)
|
go fmt $(GOSRC_APP)
|
||||||
find . -name "*.go" -exec go fmt {} \;
|
find . -name "*.go" -exec go fmt {} \;
|
||||||
|
|
||||||
|
# Examine Go source code and reports suspicious constructs
|
||||||
|
.PHONY: vet
|
||||||
|
go vet ./...
|
||||||
|
|
||||||
|
|
||||||
|
# Run linter for the Go programming language.
|
||||||
|
# Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules
|
||||||
|
.PHONY: staticcheck
|
||||||
|
staticcheck:
|
||||||
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||||
|
$$(go env GOPATH)/bin/staticcheck ./...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user