Skip to content

Commit 6629113

Browse files
committed
Update linting to use golangci-lint
Signed-off-by: Phil Estes <[email protected]>
1 parent 9365a1b commit 6629113

2 files changed

Lines changed: 19 additions & 12 deletions

File tree

.golangci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
linters:
2+
enable:
3+
- structcheck
4+
- varcheck
5+
- staticcheck
6+
- unconvert
7+
- gofmt
8+
- goimports
9+
- golint
10+
- ineffassign
11+
- vet
12+
- unused
13+
- misspell
14+
disable:
15+
- errcheck
16+
17+
run:
18+
timeout: 3m

Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,9 @@ ${PREFIX}/bin/continuity: version/version.go $(shell find . -type f -name '*.go'
5252
generate:
5353
go generate -mod=vendor $(PACKAGES)
5454

55-
# Depends on binaries because vet will silently fail if it can't load compiled
56-
# imports
57-
vet: binaries
58-
@echo "+ $@"
59-
@go vet -mod=vendor $(PACKAGES)
60-
61-
fmt:
62-
@echo "+ $@"
63-
@test -z "$$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | grep -v vendor/ | tee /dev/stderr)" || \
64-
echo "+ please format Go code with 'gofmt -s'"
65-
6655
lint:
6756
@echo "+ $@"
68-
@test -z "$$(golint $(PACKAGES) | grep -v Godeps/_workspace/src/ | grep -v vendor/ |tee /dev/stderr)"
57+
@golangci-lint run
6958

7059
build:
7160
@echo "+ $@"

0 commit comments

Comments
 (0)