mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-25 22:42:16 -05:00
use golangci linters
This commit is contained in:
@@ -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': [
|
||||
{
|
||||
|
||||
34
.golangci.yml
Normal file
34
.golangci.yml
Normal file
@@ -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
|
||||
|
||||
6
Makefile
6
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:
|
||||
|
||||
Reference in New Issue
Block a user