Configure golangci-lint and fix warnings

This commit is contained in:
Jan Dittberner 2021-01-09 11:24:40 +01:00
parent ecd1846975
commit 2e467b3d2e
20 changed files with 915 additions and 559 deletions

39
.golangci.yml Normal file
View file

@ -0,0 +1,39 @@
---
output:
sort-results: true
linter-settings:
goimports:
local-prefixes: git.cacert.org/cacert-gosigner
misspell:
locale: US
ignore-words:
- CAcert
linters:
disable-all: false
enable:
- errorlint
- gocognit
- goconst
- gocritic
- gofmt
- goheader
- goimports
- golint
- gomnd
- gosec
- interfacer
- lll
- makezero
- misspell
- nakedret
- nestif
- nlreturn
- nolintlint
- predeclared
- rowserrcheck
- scopelint
- sqlclosecheck
- wrapcheck
- wsl