mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 09:51:23 +00:00
Fix pluginator incompatibility with nolint lines
This commit is contained in:
@@ -72,10 +72,7 @@ func ConvertToBuiltInPlugin() (retErr error) {
|
||||
if strings.HasPrefix(l, "//go:generate") {
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(l, "//noinspection") {
|
||||
continue
|
||||
}
|
||||
if l == "var "+konfig.PluginSymbol+" plugin" {
|
||||
if strings.HasPrefix(l, "var "+konfig.PluginSymbol+" plugin") {
|
||||
continue
|
||||
}
|
||||
if strings.Contains(l, " Transform(") {
|
||||
@@ -136,9 +133,12 @@ func newWriter(r string) (*writer, error) {
|
||||
}
|
||||
|
||||
// Assume that this command is running with a $PWD of
|
||||
// $HOME/kustomize/plugin/builtin/secretGenerator
|
||||
//
|
||||
// $HOME/kustomize/plugin/builtin/secretGenerator
|
||||
//
|
||||
// (for example). Then we want to write to
|
||||
// $HOME/kustomize/api/builtins
|
||||
//
|
||||
// $HOME/kustomize/api/builtins
|
||||
func makeOutputFileName(root string) string {
|
||||
return filepath.Join(
|
||||
"..", "..", "..", "api/internal", packageForGeneratedCode, root+".go")
|
||||
|
||||
@@ -34,8 +34,7 @@ type plugin struct{
|
||||
FieldSpecs []types.FieldSpec ` + "`json:\"fieldSpecs,omitempty\" yaml:\"fieldSpecs,omitempty\"`" + `
|
||||
}
|
||||
|
||||
//noinspection GoUnusedGlobalVariable
|
||||
var KustomizePlugin plugin
|
||||
var KustomizePlugin plugin //nolint:gochecknoglobals
|
||||
|
||||
func (p *plugin) Config(
|
||||
_ *resmap.PluginHelpers, config []byte) (err error) {
|
||||
@@ -171,8 +170,7 @@ type plugin struct {
|
||||
types.ConfigMapArgs
|
||||
}
|
||||
|
||||
//noinspection GoUnusedGlobalVariable
|
||||
var KustomizePlugin plugin
|
||||
var KustomizePlugin plugin //nolint:gochecknoglobals
|
||||
|
||||
func (p *plugin) Config(h *resmap.PluginHelpers, config []byte) (err error) {
|
||||
p.ConfigMapArgs = types.ConfigMapArgs{}
|
||||
|
||||
@@ -9,8 +9,7 @@ import (
|
||||
|
||||
type plugin struct{}
|
||||
|
||||
//noinspection GoUnusedGlobalVariable
|
||||
var KustomizePlugin plugin
|
||||
var KustomizePlugin plugin //nolint:gochecknoglobals
|
||||
|
||||
func (p *plugin) Config(
|
||||
_ *resmap.PluginHelpers, _ []byte) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user