updated deps; code cleanup; updated golangci linter conf
This commit is contained in:
@@ -22,11 +22,20 @@ linters-settings:
|
||||
- return
|
||||
ignored-numbers:
|
||||
- '0'
|
||||
- '0.5'
|
||||
- '1'
|
||||
- '2'
|
||||
- '3'
|
||||
- '4'
|
||||
- '5'
|
||||
- '6'
|
||||
- '7'
|
||||
- '8'
|
||||
- '9'
|
||||
- '10'
|
||||
- '20'
|
||||
- '100'
|
||||
- '1000'
|
||||
ignored-functions:
|
||||
- strings.SplitN
|
||||
- os.OpenFile
|
||||
@@ -42,32 +51,45 @@ linters-settings:
|
||||
allow-unused: false # report any unused nolint directives
|
||||
require-explanation: false # don't require an explanation for nolint directives
|
||||
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
|
||||
tagliatelle:
|
||||
case:
|
||||
use-field-name: true
|
||||
rules:
|
||||
# Any struct tag type can be used.
|
||||
# Support string case: `camel`, `pascal`, `kebab`, `snake`, `upperSnake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header`.
|
||||
json: snake
|
||||
yaml: snake
|
||||
xml: camel
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- bodyclose
|
||||
enable-all: true
|
||||
disable:
|
||||
- gochecknoglobals
|
||||
- depguard
|
||||
- dogsled
|
||||
- dupl
|
||||
- errcheck
|
||||
- exportloopref
|
||||
- gochecknoinits
|
||||
- gocritic
|
||||
- gofmt
|
||||
- gomnd
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- lll
|
||||
- misspell
|
||||
- noctx
|
||||
- nolintlint
|
||||
- staticcheck
|
||||
- stylecheck
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unparam
|
||||
- unused
|
||||
- whitespace
|
||||
- gci
|
||||
- gofumpt
|
||||
- goimports
|
||||
- varnamelen
|
||||
- funlen
|
||||
- cyclop
|
||||
- wsl
|
||||
- nosnakecase
|
||||
- nlreturn
|
||||
- godot
|
||||
- nestif
|
||||
- wrapcheck
|
||||
- gocognit
|
||||
- gocyclo
|
||||
- maintidx
|
||||
- nonamedreturns
|
||||
- exhaustivestruct
|
||||
- exhaustruct
|
||||
- forcetypeassert
|
||||
- godox
|
||||
- nakedret
|
||||
- tagalign
|
||||
- maligned
|
||||
# remove for new projects
|
||||
- errname
|
||||
- goerr113
|
||||
- tagliatelle
|
||||
|
||||
Reference in New Issue
Block a user