2020-02-27 10:59:02 +00:00
|
|
|
linters:
|
|
|
|
enable:
|
2024-02-16 08:41:06 +00:00
|
|
|
- depguard
|
2023-06-21 08:07:30 +00:00
|
|
|
- misspell
|
2021-10-27 09:01:15 +00:00
|
|
|
- revive
|
2021-09-14 15:36:28 +00:00
|
|
|
disable:
|
|
|
|
# Disable soon to deprecated[1] linters that lead to false
|
|
|
|
# positives when build tags disable certain files[2]
|
|
|
|
# 1: https://github.com/golangci/golangci-lint/issues/1841
|
|
|
|
# 2: https://github.com/prometheus/node_exporter/issues/1545
|
2021-09-29 18:12:14 +00:00
|
|
|
- deadcode
|
|
|
|
- unused
|
|
|
|
- structcheck
|
|
|
|
- varcheck
|
2020-02-27 10:59:02 +00:00
|
|
|
|
2019-05-06 13:42:50 +00:00
|
|
|
issues:
|
|
|
|
exclude-rules:
|
2021-09-29 18:12:14 +00:00
|
|
|
- path: _test.go
|
|
|
|
linters:
|
|
|
|
- errcheck
|
2019-05-06 13:42:50 +00:00
|
|
|
|
|
|
|
linters-settings:
|
2024-02-16 08:41:06 +00:00
|
|
|
depguard:
|
|
|
|
rules:
|
|
|
|
no_exec_policy:
|
|
|
|
files:
|
|
|
|
- "!$test"
|
|
|
|
deny:
|
|
|
|
- pkg: "os/exec"
|
|
|
|
desc: "Using os/exec to run sub processes it not allowed by policy"
|
2019-05-06 13:42:50 +00:00
|
|
|
errcheck:
|
2023-06-21 08:07:30 +00:00
|
|
|
exclude-functions:
|
|
|
|
# Used in HTTP handlers, any error is handled by the server itself.
|
|
|
|
- (net/http.ResponseWriter).Write
|
|
|
|
# Never check for logger errors.
|
|
|
|
- (github.com/go-kit/log.Logger).Log
|
2023-07-18 08:46:59 +00:00
|
|
|
revive:
|
|
|
|
rules:
|
|
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
|
|
|
|
- name: unused-parameter
|
|
|
|
severity: warning
|
|
|
|
disabled: true
|