Fix pluginator incompatibility with nolint lines

This commit is contained in:
Katrina Verey
2022-11-28 19:11:09 -05:00
parent 832b552076
commit a612cd2b7e
27 changed files with 54 additions and 87 deletions

View File

@@ -22,9 +22,7 @@ type plugin struct {
Count int `json:"count,omitempty" yaml:"count,omitempty"`
}
//nolint: golint
//noinspection GoUnusedGlobalVariable
var KustomizePlugin plugin
var KustomizePlugin plugin //nolint:gochecknoglobals
func (p *plugin) Config(_ *resmap.PluginHelpers, c []byte) error {
return yaml.Unmarshal(c, p)

View File

@@ -21,9 +21,7 @@ type plugin struct {
t resmap.Transformer
}
//nolint: golint
//noinspection GoUnusedGlobalVariable
var KustomizePlugin plugin
var KustomizePlugin plugin //nolint:gochecknoglobals
func (p *plugin) makePrefixPluginConfig() ([]byte, error) {
var s struct {
@@ -55,7 +53,9 @@ func (p *plugin) Config(h *resmap.PluginHelpers, _ []byte) error {
}
// Returns a constant, rather than
// time.Now().Format("2006-01-02")
//
// time.Now().Format("2006-01-02")
//
// to make tests happy.
// This is just an example.
func getDate() string {

View File

@@ -19,9 +19,7 @@ type plugin struct {
Keys []string `json:"keys,omitempty" yaml:"keys,omitempty"`
}
//nolint: golint
//noinspection GoUnusedGlobalVariable
var KustomizePlugin plugin
var KustomizePlugin plugin //nolint:gochecknoglobals
var database = map[string]string{
"TREE": "oak",

View File

@@ -19,9 +19,7 @@ type plugin struct {
Port string `json:"port,omitempty" yaml:"port,omitempty"`
}
//nolint: golint
//noinspection GoUnusedGlobalVariable
var KustomizePlugin plugin
var KustomizePlugin plugin //nolint:gochecknoglobals
const tmpl = `
apiVersion: v1

View File

@@ -22,9 +22,7 @@ type plugin struct {
t resmap.Transformer
}
//nolint: golint
//noinspection GoUnusedGlobalVariable
var KustomizePlugin plugin
var KustomizePlugin plugin //nolint:gochecknoglobals
func (p *plugin) makePrefixPluginConfig(n string) ([]byte, error) {
var s struct {