chore: update Go, linter, CI

This commit is contained in:
Fernandez Ludovic
2022-09-10 12:29:58 +02:00
parent 2d6ebedb0f
commit 9b1db3f461
7 changed files with 74 additions and 30 deletions

View File

@ -1,48 +1,93 @@
run:
deadline: 2m
timeout: 2m
skip-files: []
linters-settings:
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
gocyclo:
min-complexity: 12
min-complexity: 16
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale: US
funlen:
lines: -1
statements: 40
gofumpt:
extra-rules: true
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/pkg/errors
godox:
keywords:
- FIXME
gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- sloppyReassign
- rangeValCopy
- octalLiteral
- paramTypeCombine # already handle by gofumpt.extra-rules
settings:
hugeParam:
sizeThreshold: 100
forbidigo:
forbid:
- '^print(ln)?$'
- '^panic$'
- '^spew\.Print(f|ln)?$'
- '^spew\.Dump$'
linters:
enable-all: true
disable:
- deadcode # deprecated
- exhaustivestruct # deprecated
- golint # deprecated
- scopelint # deprecated
- ifshort # deprecated
- interfacer # deprecated
- maligned # deprecated
- lll
- gosec
- nosnakecase # deprecated
- scopelint # deprecated
- scopelint # deprecated
- structcheck # deprecated
- varcheck # deprecated
- execinquery # not relevant (SQL)
- rowserrcheck # not relevant (SQL)
- sqlclosecheck # not relevant (SQL)
- cyclop # duplicate of gocyclo
- dupl
- prealloc
- exhaustive
- exhaustruct
- forbidigo
- gochecknoglobals
- gochecknoinits
- gomnd
- wsl
- nlreturn
- testpackage
- paralleltest
- tparallel
- goerr113
- wrapcheck
- exhaustive
- exhaustivestruct
- forbidigo
- varnamelen
- gomnd
- gosec
- lll
- nilnil
- ifshort
- exhaustruct
- nlreturn
- paralleltest
- prealloc
- testpackage
- tparallel
- varnamelen
- wrapcheck
- wsl
issues:
exclude-use-default: false
max-per-linter: 0
max-same-issues: 0
exclude: []
exclude:
- 'package-comments: should have a package comment'