Skip to content

Instantly share code, notes, and snippets.

@vuon9
Last active June 5, 2020 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vuon9/3d1489d3eadfc57868abef652f3d70b9 to your computer and use it in GitHub Desktop.
Save vuon9/3d1489d3eadfc57868abef652f3d70b9 to your computer and use it in GitHub Desktop.
golangci-lint sample yml configuration
linters:
disable-all: true
enable:
- deadcode
- dupl
- errcheck
- gocritic
- gocognit
- gosimple
- govet
- lll
- prealloc
- staticcheck
- structcheck
- typecheck
- varcheck
- unconvert
- unparam
- unused
- gocyclo
linters-settings:
gocognit:
min-complexity: 15
lll:
line-length: 180
issues:
exclude-use-default: false
exclude:
- Error return value of .((c\.)(Error|(Abort|ShouldBind).*?)). is not checked
exclude-rules:
# Exclude some linters on test files
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- gocognit
- lll
- linters:
- goerr113
text: "err113"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment