forked from hashicorp/consul
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using golangci-lint has a number of advantages: - adding new linters becomes much easier, its a couple lines of yaml config instead of more bash scripting - it enables whitelisting of issues using inline comments or regex - when running multiple linters less work is done. The parsed source can be reused by multiple linters - linters are run in parallel to reduce CI runtime.
- Loading branch information
Showing
5 changed files
with
39 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
linters: | ||
disable-all: true | ||
enable: | ||
- gofmt | ||
- govet | ||
|
||
issues: | ||
# Disable the default exclude list so that all excludes are explicitly | ||
# defined in this file. | ||
exclude-use-default: false | ||
|
||
linters-settings: | ||
gofmt: | ||
simplify: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ GOTOOLS = \ | |
golang.org/x/tools/cmd/stringer \ | ||
github.com/gogo/protobuf/protoc-gen-gofast@$(GOGOVERSION) \ | ||
github.com/hashicorp/protoc-gen-go-binary \ | ||
github.com/vektra/mockery/cmd/mockery | ||
github.com/vektra/mockery/cmd/mockery \ | ||
github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
GOTAGS ?= | ||
GOOS?=$(shell go env GOOS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.golangci.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.golangci.yml |