Skip to content

Commit

Permalink
plugin: temporarily hide warning about using plugins using the old API (
Browse files Browse the repository at this point in the history
#4002)

Co-authored-by: Simon Sawert <simon@sawert.se>
  • Loading branch information
ldez and bombsimon authored Aug 11, 2023
1 parent 9fc1e20 commit a9378d9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/lint/lintersdb/custom_linters.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package lintersdb

import (
"fmt"
"os"
"path/filepath"
"plugin"

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

m.log.Warnf("plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: " +
"https://golangci-lint.run/contributing/new-linters/#create-a-plugin")
// TODO(ldez): remove this env var (but keep the log) in the next minor version (v1.55.0)
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)
if !ok {
Expand Down

0 comments on commit a9378d9

Please sign in to comment.