Permalink
Browse files

Merge pull request #51 from urcomputeringpal/doublestar

Allow for globs with ** for recursive searches
  • Loading branch information...
jnewland committed Dec 8, 2018
2 parents 85c1d57 + fbfb00f commit 5f021ecbf55c92aed2a1c304310d9a907fb03fe8

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -53,3 +53,7 @@
name = "gopkg.in/yaml.v2"
version = "2.2.1"
source = "github.com/go-yaml/yaml"

[[constraint]]
name = "github.com/bmatcuk/doublestar"
branch = "master"
@@ -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)
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 5f021ec

Please sign in to comment.