Skip to content

Commit

Permalink
Upgrade custom plugin (gardener#8435)
Browse files Browse the repository at this point in the history
* Remove deprecated `AnalyzerPlugin`

* Update go-apidiff

Fix of - go-git/go-git#500

* Update skaffold
  • Loading branch information
acumino authored and nickytd committed Sep 11, 2023
1 parent 5e49575 commit 1104294
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
4 changes: 2 additions & 2 deletions hack/tools.mk
Expand Up @@ -60,15 +60,15 @@ YQ := $(TOOLS_BIN_DIR)/yq
# default tool versions
DOCFORGE_VERSION ?= v0.34.0
GOLANGCI_LINT_VERSION ?= v1.54.2
GO_APIDIFF_VERSION ?= v0.6.0
GO_APIDIFF_VERSION ?= v0.6.1
GO_ADD_LICENSE_VERSION ?= v1.1.1
GOIMPORTSREVISER_VERSION ?= v3.4.1
GO_VULN_CHECK_VERSION ?= latest
HELM_VERSION ?= v3.12.3
KIND_VERSION ?= v0.20.0
KUBECTL_VERSION ?= v1.27.4
PROTOC_VERSION ?= 24.1
SKAFFOLD_VERSION ?= v2.3.0
SKAFFOLD_VERSION ?= v2.7.0
YQ_VERSION ?= v4.35.1

export TOOLS_BIN_DIR := $(TOOLS_BIN_DIR)
Expand Down
13 changes: 3 additions & 10 deletions hack/tools/gomegacheck/plugin/golangci_lint.go
Expand Up @@ -20,14 +20,7 @@ import (
"github.com/gardener/gardener/hack/tools/gomegacheck/pkg/gomegacheck"
)

// AnalyzerPlugin is the golangci-lint plugin.
var AnalyzerPlugin analyzerPlugin //nolint:deadcode,unused

// analyzerPlugin implements the golangci-lint AnalyzerPlugin interface.
// see https://golangci-lint.run/contributing/new-linters/#how-to-add-a-private-linter-to-golangci-lint
type analyzerPlugin struct{}

// GetAnalyzers returns the gomegacheck analyzer.
func (*analyzerPlugin) GetAnalyzers() []*analysis.Analyzer {
return []*analysis.Analyzer{gomegacheck.Analyzer}
// New returns the gomegacheck analyzer.
func New(conf any) ([]*analysis.Analyzer, error) {
return []*analysis.Analyzer{gomegacheck.Analyzer}, nil
}
13 changes: 3 additions & 10 deletions hack/tools/logcheck/plugin/golangci_lint.go
Expand Up @@ -20,14 +20,7 @@ import (
"github.com/gardener/gardener/hack/tools/logcheck/pkg/logcheck"
)

// AnalyzerPlugin is the golangci-lint plugin.
var AnalyzerPlugin analyzerPlugin //nolint:deadcode,unused

// analyzerPlugin implements the golangci-lint AnalyzerPlugin interface.
// see https://golangci-lint.run/contributing/new-linters/#how-to-add-a-private-linter-to-golangci-lint
type analyzerPlugin struct{}

// GetAnalyzers returns the logcheck analyzer.
func (*analyzerPlugin) GetAnalyzers() []*analysis.Analyzer {
return []*analysis.Analyzer{logcheck.Analyzer}
// New returns the logcheck analyzer.
func New(conf any) ([]*analysis.Analyzer, error) {
return []*analysis.Analyzer{logcheck.Analyzer}, nil
}

0 comments on commit 1104294

Please sign in to comment.