mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
staticcheck
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
0ff43808ca
commit
a1d0f6f9c0
2 changed files with 9 additions and 2 deletions
|
@ -15,9 +15,11 @@
|
||||||
- GO15VENDOREXPERIMENT=1
|
- GO15VENDOREXPERIMENT=1
|
||||||
install:
|
install:
|
||||||
- go get github.com/golang/lint/golint
|
- go get github.com/golang/lint/golint
|
||||||
|
- go get honnef.co/go/tools/cmd/staticcheck
|
||||||
script:
|
script:
|
||||||
- go build -v
|
- go build -v
|
||||||
- go vet $(go list ./... | grep -v vendor)
|
- go vet $(go list ./... | grep -v vendor)
|
||||||
|
- staticcheck $(go list ./... | grep -v vendor)
|
||||||
- test -z "$(golint ./... | grep -v vendor | tee /dev/stderr)"
|
- test -z "$(golint ./... | grep -v vendor | tee /dev/stderr)"
|
||||||
- test -z "$(gofmt -s -l . | grep -v vendor | tee /dev/stderr)"
|
- test -z "$(gofmt -s -l . | grep -v vendor | tee /dev/stderr)"
|
||||||
- make dind dtest
|
- make dind dtest
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -26,7 +26,7 @@ GO_LDFLAGS_STATIC=-ldflags "-w $(CTIMEVAR) -extldflags -static"
|
||||||
# List the GOOS and GOARCH to build
|
# List the GOOS and GOARCH to build
|
||||||
GOOSARCHES = darwin/amd64 darwin/386 freebsd/amd64 freebsd/386 linux/arm linux/arm64 linux/amd64 linux/386 solaris/amd64 windows/amd64 windows/386
|
GOOSARCHES = darwin/amd64 darwin/386 freebsd/amd64 freebsd/386 linux/arm linux/arm64 linux/amd64 linux/386 solaris/amd64 windows/amd64 windows/386
|
||||||
|
|
||||||
all: clean build fmt lint test vet install ## Runs a clean, build, fmt, lint, test, vet and install
|
all: clean build fmt lint test staticcheck vet install ## Runs a clean, build, fmt, lint, test, vet and install
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(NAME) ## Builds a dynamic executable or package
|
build: $(NAME) ## Builds a dynamic executable or package
|
||||||
|
@ -62,6 +62,11 @@ vet: ## Verifies `go vet` passes
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go vet $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
|
@go vet $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
|
||||||
|
|
||||||
|
.PHONY: staticcheck
|
||||||
|
staticcheck: ## Verifies `staticcheck` passes
|
||||||
|
@echo "+ $@"
|
||||||
|
@staticcheck $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: ## Installs the executable or package
|
install: ## Installs the executable or package
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
|
@ -98,7 +103,7 @@ release: *.go VERSION ## Builds the cross-compiled binaries, naming them in such
|
||||||
|
|
||||||
.PHONY: bump-version
|
.PHONY: bump-version
|
||||||
BUMP := patch
|
BUMP := patch
|
||||||
bump-version: ## Bump the version in the version file. Set KIND to [ patch | major | minor ]
|
bump-version: ## Bump the version in the version file. Set BUMP to [ patch | major | minor ]
|
||||||
@go get -u github.com/jessfraz/junk/sembump # update sembump tool
|
@go get -u github.com/jessfraz/junk/sembump # update sembump tool
|
||||||
$(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION)))
|
$(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION)))
|
||||||
@echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)"
|
@echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)"
|
||||||
|
|
Loading…
Reference in a new issue