Add roles and versions as new dimensions (in addition to language)

See the main issue #13776 for details.

Fixes #519
Fixes #13680
Fixes #13663
Fixes #13776
Fixes #13855
Fixes #13648
Fixes #13996
Fixes #14001
Fixes #14031
Fixes #13818
Fixes #13196
This commit is contained in:
Bjørn Erik Pedersen
2025-11-05 15:52:47 +01:00
parent ff0f67ea7f
commit 264022a75a
209 changed files with 13766 additions and 6019 deletions
+8 -8
View File
@@ -173,16 +173,16 @@ func (gm *GlobMatcher) CompilePredicate() (func(string) bool, error) {
if gm.IsZero() {
panic("no includes or excludes")
}
var p predicate.P[string]
var b predicate.PR[string]
for _, include := range gm.Includes {
g, err := glob.Compile(include, '/')
if err != nil {
return nil, err
}
fn := func(s string) bool {
return g.Match(s)
fn := func(s string) predicate.Match {
return predicate.BoolMatch(g.Match(s))
}
p = p.Or(fn)
b = b.Or(fn)
}
for _, exclude := range gm.Excludes {
@@ -190,13 +190,13 @@ func (gm *GlobMatcher) CompilePredicate() (func(string) bool, error) {
if err != nil {
return nil, err
}
fn := func(s string) bool {
return !g.Match(s)
fn := func(s string) predicate.Match {
return predicate.BoolMatch(!g.Match(s))
}
p = p.And(fn)
b = b.And(fn)
}
return p, nil
return b.BoolFunc(), nil
}
func DecodeConfig(_ config.BaseConfig, m map[string]any) (Config, error) {