Skip to content

Commit dc8c9cd

Browse files
kolyshkindrakenclimber
authored andcommitted
Makefile: use golangci-lint for lint target
golint is no more, so remove it. golangci-lint is a tool that runs multuple linters in parallel. Default configuration includes go vet (which is being replaced), errorcheck, and a few other linters (see golangci-lint linters). It is assumed that users do have golangci-lint installed, or can figure out how to do that. Now, since golangci-lint runs govet, it makes sense to modify the check target to call lint instead of go vet. README is amended accordingly. Signed-off-by: Kir Kolyshkin <[email protected]> Acked-by: Paul Moore <[email protected]> Signed-off-by: Tom Hromatka <[email protected]>
1 parent 96325c6 commit dc8c9cd

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
all: check-build
66

7-
check: vet test
7+
check: lint test
88

99
check-build:
1010
go build
@@ -16,7 +16,7 @@ fix-syntax:
1616
gofmt -w .
1717

1818
vet:
19-
go vet -v
19+
go vet -v ./...
2020

2121
# Previous bugs have made the tests freeze until the timeout. Golang default
2222
# timeout for tests is 10 minutes, which is too long, considering current tests
@@ -28,5 +28,4 @@ test:
2828
go test -v -timeout $(TEST_TIMEOUT)
2929

3030
lint:
31-
@$(if $(shell which golint),true,$(error "install golint and include it in your PATH"))
32-
golint -set_exit_status
31+
golangci-lint run .

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ you want to run the standard regression tests, you can excute the following:
4545

4646
# make check
4747

48-
In order to execute the 'make lint' recipe the 'golint' tool is needed, it
49-
can be found at:
48+
In order to use it, the 'golangci-lint' tool is needed, which can be found at:
5049

51-
* https://github.com/golang/lint
50+
* https://github.com/golangci/golangci-lint

0 commit comments

Comments
 (0)