cleanup Go linter settings (#16736)

This commit is contained in:
ferhat elmas
2023-03-05 05:57:35 +01:00
committed by GitHub
parent 9d062b37d7
commit 3423028713
13 changed files with 59 additions and 52 deletions

View File

@@ -1,39 +1,41 @@
linters-settings:
gofumpt:
lang-version: "1.18"
lang-version: '1.19'
misspell:
locale: US
staticcheck:
go: '1.19'
checks: ['all', '-ST1005', '-ST1000', '-SA4000', '-SA9004', '-SA1019', '-SA1008', '-U1000', '-ST1016']
linters:
disable-all: true
enable:
- typecheck
- goimports
- misspell
- govet
- revive
- ineffassign
- gomodguard
- durationcheck
- gocritic
- gofmt
- gofumpt
- goimports
- gomodguard
- govet
- ineffassign
- misspell
- revive
- staticcheck
- tenv
- typecheck
- unconvert
- unused
- gocritic
- gofumpt
- tenv
- durationcheck
issues:
exclude-use-default: false
exclude:
- should have a package comment
- error strings should not be capitalized or end with punctuation or a newline
# todo fix these when we get enough time.
- "singleCaseSwitch: should rewrite switch statement to if statement"
- "unlambda: replace"
- "captLocal:"
- "ifElseChain:"
- "elseif:"
service:
golangci-lint-version: 1.43.0 # use the fixed version to not introduce new linters unexpectedly
- should have a package comment
- error strings should not be capitalized or end with punctuation or a newline
# todo fix these when we get enough time.
- 'singleCaseSwitch: should rewrite switch statement to if statement'
- 'unlambda: replace'
- 'captLocal:'
- 'ifElseChain:'
- 'elseif:'