Skip to content

Commit

Permalink
Update linting to use golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
  • Loading branch information
estesp committed Jul 8, 2020
1 parent 9365a1b commit 6629113
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
18 changes: 18 additions & 0 deletions .golangci.yml
@@ -0,0 +1,18 @@
linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
- goimports
- golint
- ineffassign
- vet
- unused
- misspell
disable:
- errcheck

run:
timeout: 3m
13 changes: 1 addition & 12 deletions Makefile
Expand Up @@ -52,20 +52,9 @@ ${PREFIX}/bin/continuity: version/version.go $(shell find . -type f -name '*.go'
generate:
go generate -mod=vendor $(PACKAGES)

# Depends on binaries because vet will silently fail if it can't load compiled
# imports
vet: binaries
@echo "+ $@"
@go vet -mod=vendor $(PACKAGES)

fmt:
@echo "+ $@"
@test -z "$$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | grep -v vendor/ | tee /dev/stderr)" || \
echo "+ please format Go code with 'gofmt -s'"

lint:
@echo "+ $@"
@test -z "$$(golint $(PACKAGES) | grep -v Godeps/_workspace/src/ | grep -v vendor/ |tee /dev/stderr)"
@golangci-lint run

build:
@echo "+ $@"
Expand Down

0 comments on commit 6629113

Please sign in to comment.