mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
update golangci-lint v1.49.0
This commit is contained in:
@@ -82,7 +82,7 @@ type KRMFunctionVersion struct {
|
||||
|
||||
type KRMFunctionValidation struct {
|
||||
// OpenAPIV3Schema is the OpenAPI v3 schema for an instance of the KRM function.
|
||||
OpenAPIV3Schema *spec.Schema `yaml:"openAPIV3Schema,omitempty" json:"openAPIV3Schema,omitempty"` // nolint: tagliatelle
|
||||
OpenAPIV3Schema *spec.Schema `yaml:"openAPIV3Schema,omitempty" json:"openAPIV3Schema,omitempty"` //nolint: tagliatelle
|
||||
}
|
||||
|
||||
type KRMFunctionNames struct {
|
||||
|
||||
@@ -34,7 +34,7 @@ func (c *Filter) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error) {
|
||||
}
|
||||
|
||||
func (c *Filter) Run(reader io.Reader, writer io.Writer) error {
|
||||
cmd := exec.Command(c.Path, c.Args...) // nolint:gosec
|
||||
cmd := exec.Command(c.Path, c.Args...) //nolint:gosec
|
||||
cmd.Stdin = reader
|
||||
cmd.Stdout = writer
|
||||
cmd.Stderr = os.Stderr
|
||||
|
||||
@@ -204,7 +204,7 @@ func (s *StorageMount) String() string {
|
||||
func GetFunctionSpec(n *yaml.RNode) (*FunctionSpec, error) {
|
||||
meta, err := n.GetMeta()
|
||||
if err != nil {
|
||||
return nil, nil
|
||||
return nil, fmt.Errorf("failed to get ResourceMeta: %w", err)
|
||||
}
|
||||
|
||||
fn, err := getFunctionSpecFromAnnotation(n, meta)
|
||||
@@ -237,7 +237,10 @@ func getFunctionSpecFromAnnotation(n *yaml.RNode, meta yaml.ResourceMeta) (*Func
|
||||
}
|
||||
}
|
||||
n, err := n.Pipe(yaml.Lookup("metadata", "configFn"))
|
||||
if err != nil || yaml.IsMissingOrNull(n) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to LookUp configFn: %w", err)
|
||||
}
|
||||
if yaml.IsMissingOrNull(n) {
|
||||
return nil, nil
|
||||
}
|
||||
s, err := n.String()
|
||||
|
||||
Reference in New Issue
Block a user