forked from toolshed/abra
Add experimental staticcheck into linting CI
See https://staticcheck.io for more. This is set to be ignored on failure so that it doesn't disrupt current work flows but maybe it is nice to add. Just drop the `ignore: ...` line and it will fail builds.
This commit is contained in:
5
Makefile
5
Makefile
@ -4,7 +4,7 @@ GOPATH := $(shell go env GOPATH)
|
||||
VERSION := $(shell cat ./version)
|
||||
LDFLAGS := "-X 'main.Commit=$(COMMIT)' -X 'main.Version=$(VERSION)'"
|
||||
|
||||
all: run install build clean format check
|
||||
all: run install build clean format check static
|
||||
|
||||
run:
|
||||
@go run -ldflags=$(LDFLAGS) $(ABRA)
|
||||
@ -23,3 +23,6 @@ format:
|
||||
|
||||
check:
|
||||
@test -z $$(gofmt -l .) || (echo "gofmt: formatting issue - run 'make format' to resolve" && exit 1)
|
||||
|
||||
static:
|
||||
@staticcheck $(ABRA)
|
||||
|
Reference in New Issue
Block a user