superlint/TEMPLATES/.golangci.yml

42 lines
975 B
YAML
Raw Normal View History

2020-02-28 10:51:29 -05:00
---
#########################
#########################
## Golang Linter rules ##
#########################
#########################
2020-02-28 11:08:38 -05:00
# configure golangci-lint
# see https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
issues:
exclude-rules:
- path: _test\.go
linters:
- dupl
- gosec
- goconst
2020-02-28 11:08:38 -05:00
linters:
enable:
- gosec
- unconvert
- gocyclo
- goconst
- goimports
- gocritic
- govet
- revive
2020-02-28 10:51:29 -05:00
linters-settings:
errcheck:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
2020-02-28 11:08:38 -05:00
check-blank: true
2020-02-28 10:51:29 -05:00
govet:
enable:
# report about shadowed variables
- shadowing
2020-02-28 11:08:38 -05:00
gocyclo:
# minimal code complexity to report, 30 by default
min-complexity: 15
2020-02-28 10:51:29 -05:00
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true