| 1 |
version = "2" |
| 2 |
|
| 3 |
[run] |
| 4 |
# don't lint tests |
| 5 |
tests = false |
| 6 |
|
| 7 |
[formatters] |
| 8 |
enable = [ |
| 9 |
"gofmt", # check that gofmt is satisfied |
| 10 |
] |
| 11 |
|
| 12 |
# enable additional linters |
| 13 |
[linters] |
| 14 |
disable = [ |
| 15 |
"errcheck", |
| 16 |
"govet", |
| 17 |
"staticcheck", |
| 18 |
] |
| 19 |
enable = [ |
| 20 |
"nolintlint", # nolint comments require justification |
| 21 |
"errorlint", # check to ensure no problems with wrapped errors |
| 22 |
"gocritic", # check for bugs, performance, and style issues |
| 23 |
] |
| 24 |
|
| 25 |
[linters.settings.nolintlint] |
| 26 |
allow-unused = false # don't allow nolint if not required |
| 27 |
require-explanation = true # require an explanation when disabling a linter |
| 28 |
require-specific = true # linter exceptions must specify the linter |