MCPcopy Index your code
hub / github.com/cli/cli / matchesAny

Function matchesAny

pkg/cmd/pr/diff/diff.go:439–450  ·  view source on GitHub ↗
(name string, excludePatterns []string)

Source from the content-addressed store, hash-verified

437}
438
439func matchesAny(name string, excludePatterns []string) bool {
440 for _, p := range excludePatterns {
441 if matched, _ := path.Match(p, name); matched {
442 return true
443 }
444 // Also match against the basename so "*.yml" matches "dir/file.yml"
445 if matched, _ := path.Match(p, path.Base(name)); matched {
446 return true
447 }
448 }
449 return false
450}

Callers 2

filterDiffFunction · 0.85
Test_matchesAnyFunction · 0.85

Calls 1

BaseMethod · 0.80

Tested by 1

Test_matchesAnyFunction · 0.68