Permalink
Browse files

Allow for globs with ** for recursive searches

Provide a way to support `directory/**/*.yaml` in globs.
  • Loading branch information...
eric authored and jnewland committed Dec 6, 2018
1 parent 7b1e794 commit 916e14a6a1e029f314fb9ef40edefa0e7716dfde
Showing with 2 additions and 2 deletions.
  1. +2 −2 validator/config.go
@@ -2,10 +2,10 @@ package validator

import (
"fmt"
"path"
"regexp"

"github.com/google/go-github/github"
"github.com/bmatcuk/doublestar"
)

// KubeValidatorConfig maps globs of Kubernetes config to schemas which validate
@@ -44,7 +44,7 @@ func (config *KubeValidatorConfig) matchingCandidates(context *Context, files []
if config.Spec != nil {
spec := *config.Spec
for _, manifestConfig := range spec.Manifests {
if matched, _ := path.Match(manifestConfig.Glob, file.GetFilename()); matched {
if matched, _ := doublestar.Match(manifestConfig.Glob, file.GetFilename()); matched {
candidate := NewCandidate(context, file, manifestConfig.Schemas)
candidates = append(candidates, candidate)
}

0 comments on commit 916e14a

Please sign in to comment.