mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-04 16:01:04 +01:00
090957658e
Switch from promlog/go-kit to promslog/slog for logging. * Update Go build to 1.23. Signed-off-by: Ben Kochie <superq@gmail.com>
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
linters:
|
|
enable:
|
|
- depguard
|
|
- misspell
|
|
- revive
|
|
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
|
|
- deadcode
|
|
- unused
|
|
- structcheck
|
|
- varcheck
|
|
|
|
issues:
|
|
exclude-rules:
|
|
- path: _test.go
|
|
linters:
|
|
- errcheck
|
|
|
|
linters-settings:
|
|
depguard:
|
|
rules:
|
|
no_exec_policy:
|
|
files:
|
|
- "!$test"
|
|
deny:
|
|
- pkg: "os/exec"
|
|
desc: "Using os/exec to run sub processes it not allowed by policy"
|
|
errcheck:
|
|
exclude-functions:
|
|
# Used in HTTP handlers, any error is handled by the server itself.
|
|
- (net/http.ResponseWriter).Write
|
|
revive:
|
|
rules:
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
|
|
- name: unused-parameter
|
|
severity: warning
|
|
disabled: true
|