Skip to content

Commit 52b8c5e

Browse files
committed
fix: Conflict resolution on multiple target filters
1 parent f26f68b commit 52b8c5e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkg/target/filter.go

+11
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,19 @@ type Matchers []Matcher
3939

4040
func (e Matchers) MatchString(s string) bool {
4141
b := false
42+
i := 0
4243
for _, exp := range e {
44+
_, ok := exp.(Ignorer)
45+
if ok {
46+
continue
47+
}
4348
b = b || exp.MatchString(s)
49+
i++
50+
}
51+
52+
// when no matches, return true
53+
if i == 0 {
54+
return true
4455
}
4556

4657
return b

0 commit comments

Comments
 (0)