2020-07-07 19:35:20 +00:00
|
|
|
# https://github.com/golangci/golangci-lint#config-file
|
|
|
|
run:
|
|
|
|
deadline: 1m
|
|
|
|
|
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
|
|
|
# default linters
|
|
|
|
- deadcode
|
|
|
|
- errcheck
|
|
|
|
- gosimple
|
|
|
|
- govet
|
|
|
|
- ineffassign
|
|
|
|
- staticcheck
|
|
|
|
- structcheck
|
|
|
|
- typecheck
|
|
|
|
- unused
|
|
|
|
- varcheck
|
|
|
|
|
|
|
|
# additional linters for this project (we should disable these if they get annoying).
|
|
|
|
- asciicheck
|
|
|
|
- bodyclose
|
|
|
|
- depguard
|
|
|
|
- dogsled
|
|
|
|
- exhaustive
|
|
|
|
- exportloopref
|
|
|
|
- funlen
|
|
|
|
- gochecknoglobals
|
|
|
|
- gochecknoinits
|
|
|
|
- gocritic
|
|
|
|
- gocyclo
|
|
|
|
- godot
|
|
|
|
- goerr113
|
|
|
|
- goheader
|
|
|
|
- goimports
|
|
|
|
- golint
|
|
|
|
- goprintffuncname
|
|
|
|
- gosec
|
|
|
|
- misspell
|
|
|
|
- nakedret
|
|
|
|
- nestif
|
|
|
|
- noctx
|
|
|
|
- nolintlint
|
|
|
|
- prealloc
|
|
|
|
- rowserrcheck
|
|
|
|
- scopelint
|
|
|
|
- sqlclosecheck
|
|
|
|
- unconvert
|
|
|
|
- unparam
|
|
|
|
- whitespace
|
|
|
|
|
|
|
|
issues:
|
|
|
|
exclude-rules:
|
2020-07-13 19:30:16 +00:00
|
|
|
# exclude tests from some rules for things that are useful in a testing context.
|
2020-07-07 19:35:20 +00:00
|
|
|
- path: _test\.go
|
|
|
|
linters:
|
|
|
|
- funlen
|
|
|
|
- gochecknoglobals
|
2020-07-13 19:30:16 +00:00
|
|
|
- goerr113
|
2020-07-07 19:35:20 +00:00
|
|
|
|
|
|
|
linters-settings:
|
|
|
|
funlen:
|
|
|
|
lines: 125
|
|
|
|
statements: 50
|
|
|
|
goheader:
|
2020-07-28 14:30:10 +00:00
|
|
|
template-path: hack/header.txt
|
2020-07-07 19:35:20 +00:00
|
|
|
goimports:
|
2020-07-13 19:30:16 +00:00
|
|
|
local-prefixes: github.com/suzerain-io
|