MCPcopy
hub / github.com/tdewolff/minify / fileFilter

Function fileFilter

cmd/minify/main.go:643–664  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

641}
642
643func fileFilter(filename string) bool {
644 if 0 < len(matches) {
645 match := false
646 base := filepath.Base(filename)
647 for _, re := range matchesRegexp {
648 if re.MatchString(base) {
649 match = true
650 break
651 }
652 }
653 if !match {
654 return false
655 }
656 }
657 match := true
658 for i, re := range filtersRegexp {
659 if re.MatchString(filename) {
660 match = filters[i][0] == '+'
661 }
662 }
663 return match
664}
665
666func fileMatches(filename string) bool {
667 if !fileFilter(filename) {

Callers 2

fileMatchesFunction · 0.85
createTasksFunction · 0.85

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…