add hclog vet to check step (#8328)

* add hclog vet to check step

* ...
This commit is contained in:
Drew Bailey 2020-07-01 10:08:37 -04:00 committed by GitHub
parent 7451eddea6
commit 463f1986b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 2 deletions

View File

@ -183,6 +183,7 @@ lint-deps: ## Install linter dependencies
@echo "==> Updating linter dependencies..."
GO111MODULE=on cd tools && go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.24.0
GO111MODULE=on cd tools && go get github.com/client9/misspell/cmd/misspell@v0.3.4
GO111MODULE=on cd tools && go get github.com/hashicorp/go-hclog/hclogvet@master
.PHONY: git-hooks
git-dir = $(shell git rev-parse --git-dir)
@ -195,6 +196,9 @@ $(git-dir)/hooks/%: dev/hooks/%
check: ## Lint the source code
@echo "==> Linting source code..."
@golangci-lint run -j 1
@echo "==> Linting hclog statements..."
@hclogvet .
@echo "==> Spell checking website..."
@misspell -error -source=text website/pages/

View File

@ -10,6 +10,7 @@ require (
github.com/golangci/golangci-lint v1.24.0
github.com/google/go-cmp v0.4.0 // indirect
github.com/hashicorp/go-bindata v3.0.8-0.20180209072458-bf7910af8997+incompatible
github.com/hashicorp/go-hclog/hclogvet v0.1.4-0.20200601163814-4a9e55fb9e7d // indirect
github.com/hashicorp/go-msgpack v1.1.5
github.com/hashicorp/hcl/v2 v2.5.1
github.com/kr/text v0.2.0 // indirect

View File

@ -143,6 +143,9 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/hashicorp/go-bindata v3.0.8-0.20180209072458-bf7910af8997+incompatible h1:EDTAuh27kAIhxuyK8ef3iHQARA+8NQaXyTeDEiG3Q6o=
github.com/hashicorp/go-bindata v3.0.8-0.20180209072458-bf7910af8997+incompatible/go.mod h1:+IrDq36jUYG0q6TsDY9uO2p77C8f8S5y+RbYHr2UI+U=
github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU=
github.com/hashicorp/go-hclog/hclogvet v0.1.4-0.20200601163814-4a9e55fb9e7d h1:J1hlEYAGIhvgB4qRFtaK+GyyvA4sJ52Th+rrXYY8pZ4=
github.com/hashicorp/go-hclog/hclogvet v0.1.4-0.20200601163814-4a9e55fb9e7d/go.mod h1:f0uAs1kAopX4JXFgR4kMixWftM8qLha6edaFVawdNtg=
github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs=
github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
@ -394,6 +397,7 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200204192400-7124308813f3/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200211205636-11eff242d136/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770 h1:M9Fif0OxNji8w+HvmhVQ8KJtiZOsjU9RgslJGhn95XE=
golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@ -8,11 +8,11 @@ import (
_ "github.com/a8m/tree/cmd/tree"
_ "github.com/client9/misspell/cmd/misspell"
_ "github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs"
_ "github.com/hashicorp/hcl/v2/cmd/hclfmt"
_ "github.com/golang/protobuf/protoc-gen-go"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/hashicorp/go-bindata/go-bindata"
_ "github.com/hashicorp/go-hclog/hclogvet"
_ "github.com/hashicorp/go-msgpack/codec/codecgen"
_ "github.com/hashicorp/hcl/v2/cmd/hclfmt"
_ "gotest.tools/gotestsum"
)