diff --git a/.golangci.yml b/.golangci.yml index a4d14ddd80362..ddd7a0228fd8c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -126,5 +126,10 @@ issues: - path: _test\.go text: "parameter.*seems to be a control flag, avoid control coupling" + - path: (^agent/|^cmd/|^config/|^filter/|^internal/|^logger/|^metric/|^models/|^selfstat/|^testutil/|^plugins/serializers/) + text: "imports-blacklist: should not use the following blacklisted import: \"log\"" + linters: + - revive + output: format: tab diff --git a/plugins/common/logrus/hook.go b/plugins/common/logrus/hook.go index 7596fbbed3194..84aae8fe8557b 100644 --- a/plugins/common/logrus/hook.go +++ b/plugins/common/logrus/hook.go @@ -2,7 +2,7 @@ package logrus import ( "io" - "log" + "log" //nolint:revive // Allow exceptional but valid use of log here. "strings" "sync" diff --git a/plugins/common/shim/config.go b/plugins/common/shim/config.go index 089c2b7ee7525..ad08e08ea803d 100644 --- a/plugins/common/shim/config.go +++ b/plugins/common/shim/config.go @@ -3,7 +3,7 @@ package shim import ( "errors" "fmt" - "log" + "log" //nolint:revive // Allow exceptional but valid use of log here. "os" "github.com/BurntSushi/toml" diff --git a/plugins/common/shim/logger.go b/plugins/common/shim/logger.go index 3a6dcb0868d0d..74bfbfdef2019 100644 --- a/plugins/common/shim/logger.go +++ b/plugins/common/shim/logger.go @@ -2,7 +2,7 @@ package shim import ( "fmt" - "log" + "log" //nolint:revive // Allow exceptional but valid use of log here. "os" "reflect"