Skip to content

Commit

Permalink
update go lint (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Jul 24, 2023
1 parent 2ee28a4 commit 25a6439
Showing 1 changed file with 18 additions and 34 deletions.
52 changes: 18 additions & 34 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,34 @@
linters-settings:
golint:
min-confidence: 0
gofumpt:
simplify: true

misspell:
locale: US

staticcheck:
checks: ['all', '-ST1005', '-ST1000', '-SA4000', '-SA9004', '-SA1019', '-SA1008', '-U1000', '-ST1016']

linters:
disable-all: true
enable:
- typecheck
- durationcheck
- gocritic
- gofmt
- gofumpt
- goimports
- misspell
- gomodguard
- govet
- revive
- ineffassign
- gosimple
- deadcode
- structcheck
- gomodguard
- gofmt
- unused
- structcheck
- misspell
- revive
- staticcheck
- tenv
- typecheck
- unconvert
- varcheck
- gocritic
- gofumpt

linters-settings:
gofumpt:
lang-version: "1.17"

# Choose whether or not to use the extra rules that are disabled
# by default
extra-rules: false
- unused

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

0 comments on commit 25a6439

Please sign in to comment.