diff --git a/.drone.star b/.drone.star index 1c6224efc..6f7535cee 100644 --- a/.drone.star +++ b/.drone.star @@ -73,10 +73,10 @@ def testing(ctx): }, { 'name': 'staticcheck', - 'image': 'webhippie/golang:1.13', + 'image': image: golangci/golangci-lint:latest', 'pull': 'always', 'commands': [ - 'make staticcheck', + golangci-lint run, ], 'volumes': [ { diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 000000000..163c2c98a --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,34 @@ +issues: + exclude-rules: + - path: pkg/proto/v0/settings.pb.go + text: "SA1019:" + linters: + - staticcheck + - path: pkg/store/filesystem/io.go + text: "SA1019:" + linters: + - staticcheck +linters: + enable: + - bodyclose + - deadcode + - errcheck + - gosimple + - govet + - ineffassign + - staticcheck + - structcheck + - typecheck + - unused + - varcheck + - depguard + - golint + - goimports + - unconvert + - scopelint + - maligned + - misspell + - gocritic + - prealloc + #- gosec + diff --git a/Makefile b/Makefile index 51a4724a1..bf62e5d69 100644 --- a/Makefile +++ b/Makefile @@ -71,9 +71,9 @@ fmt: vet: go vet $(PACKAGES) -.PHONY: staticcheck -staticcheck: - go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES) +# .PHONY: staticcheck +# staticcheck: +# go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES) .PHONY: lint lint: diff --git a/tools.go b/tools.go index e421f5285..89c783a7e 100644 --- a/tools.go +++ b/tools.go @@ -7,5 +7,5 @@ import ( _ "github.com/mitchellh/gox" _ "github.com/restic/calens" _ "golang.org/x/lint/golint" - _ "honnef.co/go/tools/cmd/staticcheck" + // _ "honnef.co/go/tools/cmd/staticcheck" )