Skip to content

Instantly share code, notes, and snippets.

@lucasmelin
Last active July 19, 2022 20:15
Show Gist options
  • Save lucasmelin/d77f5d3a056abbc37c4c6ee86415e1b6 to your computer and use it in GitHub Desktop.
Save lucasmelin/d77f5d3a056abbc37c4c6ee86415e1b6 to your computer and use it in GitHub Desktop.
Personal golangci-lint config
linters:
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
enable:
- asciicheck
- bidichk
- containedctx
- cyclop
- decorder
- depguard
- dogsled
- dupl
- durationcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forbidigo
- funlen
- gci
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- gofmt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- ifshort
- importas
- ireturn
- lll
- maintidx
- makezero
- misspell
- nakedret
- nestif
- nilnil
- nolintlint
- nonamedreturns
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
- revive
- stylecheck
- tagliatelle
- tenv
- thelper
- unconvert
- whitespace
linters-settings:
gomnd:
ignored-functions:
- os.MkdirAll,ioutil.WriteFile
tagliatelle:
case:
rules:
json: snake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment