Skip to content

Instantly share code, notes, and snippets.

@it-sova
Created February 22, 2022 17:50
Show Gist options
  • Save it-sova/13ff4904a6a0703fcb9232d24810a23d to your computer and use it in GitHub Desktop.
Save it-sova/13ff4904a6a0703fcb9232d24810a23d to your computer and use it in GitHub Desktop.
Basic GolangCI config
linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
govet:
check-shadowing: true
nolintlint:
require-explanation: true
require-specific: true
linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gomnd
- gocyclo
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
- nakedret
- prealloc
- predeclared
- revive
- staticcheck
- structcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- varcheck
- whitespace
- wsl
run:
issues-exit-code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment