plugin: temporarily hide warning about using plugins using the old API (#4002)
Some checks failed
Release a tag / release (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/alpine.Dockerfile]) (push) Has been cancelled
Some checks failed
Release a tag / release (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/alpine.Dockerfile]) (push) Has been cancelled
Co-authored-by: Simon Sawert <simon@sawert.se>
This commit is contained in:
parent
9fc1e20753
commit
a9378d9bb8
@ -2,6 +2,7 @@ package lintersdb
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"plugin"
|
"plugin"
|
||||||
|
|
||||||
@ -115,8 +116,11 @@ func (m *Manager) lookupAnalyzerPlugin(plug *plugin.Plugin) ([]*analysis.Analyze
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
m.log.Warnf("plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: " +
|
// TODO(ldez): remove this env var (but keep the log) in the next minor version (v1.55.0)
|
||||||
"https://golangci-lint.run/contributing/new-linters/#create-a-plugin")
|
if _, ok := os.LookupEnv("GOLANGCI_LINT_HIDE_WARNING_ABOUT_PLUGIN_API_DEPRECATION"); !ok {
|
||||||
|
m.log.Warnf("plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: " +
|
||||||
|
"https://golangci-lint.run/contributing/new-linters/#create-a-plugin")
|
||||||
|
}
|
||||||
|
|
||||||
analyzerPlugin, ok := symbol.(AnalyzerPlugin)
|
analyzerPlugin, ok := symbol.(AnalyzerPlugin)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user