add more linters

test cases migration to testify is now complete.
Linters are enabled for test cases too
This commit is contained in:
Nicola Murino
2020-05-06 19:36:34 +02:00
parent e9534be1e6
commit f02e24437a
43 changed files with 2288 additions and 3762 deletions

42
.golangci.yml Normal file
View File

@@ -0,0 +1,42 @@
run:
timeout: 5m
issues-exit-code: 1
tests: true
linters-settings:
dupl:
threshold: 150
errcheck:
check-type-assertions: false
check-blank: false
goconst:
min-len: 3
min-occurrences: 3
gocyclo:
min-complexity: 15
gofmt:
simplify: true
goimports:
local-prefixes: github.com/drakkan/sftpgo
maligned:
suggest-new: true
linters:
enable:
- goconst
- errcheck
- gofmt
- goimports
- golint
- unconvert
- unparam
- bodyclose
- gocyclo
- misspell
- maligned
- whitespace
- dupl
- scopelint
- rowserrcheck
- dogsled