Skip to content

Commit 105da96

Browse files
committed
chore: hide warning
1 parent 9fc1e20 commit 105da96

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/lint/lintersdb/custom_linters.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package lintersdb
22

33
import (
44
"fmt"
5+
"os"
56
"path/filepath"
67
"plugin"
78

@@ -115,8 +116,11 @@ func (m *Manager) lookupAnalyzerPlugin(plug *plugin.Plugin) ([]*analysis.Analyze
115116
return nil, err
116117
}
117118

118-
m.log.Warnf("plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: " +
119-
"https://golangci-lint.run/contributing/new-linters/#create-a-plugin")
119+
// TODO(ldez): remove this env var in the next minor version (v1.55.0)
120+
if os.Getenv("GOLANGCI_LINT_HIDE_WARNING_ABOUT_PLUGIN_API_DEPRECATION") != "1" {
121+
m.log.Warnf("plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: " +
122+
"https://golangci-lint.run/contributing/new-linters/#create-a-plugin")
123+
}
120124

121125
analyzerPlugin, ok := symbol.(AnalyzerPlugin)
122126
if !ok {

0 commit comments

Comments
 (0)