diff --git a/main.go b/main.go index a474e45..91ac27d 100644 --- a/main.go +++ b/main.go @@ -81,6 +81,10 @@ func validateFile(r io.Reader, regs []registry.Registry, k8sVersion string, c *c continue } + if sig.Kind == "" { + continue // We skip resoures that don't have a Kind defined + } + if skip(sig) { validationResults = append(validationResults, validationResult{kind: sig.Kind, version: sig.Version, err: nil, skipped: true}) continue diff --git a/pkg/fsutils/main.go b/pkg/fsutils/main.go index 12d432f..40b5686 100644 --- a/pkg/fsutils/main.go +++ b/pkg/fsutils/main.go @@ -18,7 +18,7 @@ func FindYamlInDir(dir string, fileBatches chan<- []string, batchSize int) error files = append(files, path) if len(files) > batchSize { fileBatches <- files - files = nil + files = []string{} } } return nil