MCPcopy Create free account
hub / github.com/vale-cli/vale / NewSelector

Function NewSelector

internal/check/scope.go:20–34  ·  view source on GitHub ↗
(value []string)

Source from the content-addressed store, hash-verified

18}
19
20func NewSelector(value []string) Selector {
21 negated := false
22
23 parts := []string{}
24 for i, m := range value {
25 m = strings.TrimSpace(m)
26 if i == 0 && strings.HasPrefix(m, "~") {
27 m = strings.TrimPrefix(m, "~")
28 negated = true
29 }
30 parts = append(parts, m)
31 }
32
33 return Selector{Value: parts, Negated: negated}
34}
35
36func NewScope(value []string) Scope {
37 scope := map[string][]Selector{}

Callers 2

NewScopeFunction · 0.85
MatchesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…