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:
|
2022-01-06 10:28:26 -05:00
|
|
|
- dupl
|
|
|
|
- gosec
|
|
|
|
- goconst
|
2020-02-28 11:08:38 -05:00
|
|
|
linters:
|
|
|
|
enable:
|
|
|
|
- gosec
|
|
|
|
- unconvert
|
|
|
|
- gocyclo
|
|
|
|
- goconst
|
|
|
|
- goimports
|
|
|
|
- gocritic
|
2021-08-25 10:21:26 -04:00
|
|
|
- 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:
|
2024-05-16 13:15:23 -04:00
|
|
|
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
|