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

Function NewScope

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

Source from the content-addressed store, hash-verified

34}
35
36func NewScope(value []string) Scope {
37 scope := map[string][]Selector{}
38 for _, v := range value {
39 selectors := []Selector{}
40 for _, part := range strings.Split(v, "&") {
41 selectors = append(selectors, NewSelector(strings.Split(part, ".")))
42 }
43 scope[v] = selectors
44 }
45 return Scope{Selectors: scope}
46}
47
48// Macthes the scope `s` matches `s2`.
49func (s Scope) Matches(blk nlp.Block) bool {

Callers 2

shouldRunMethod · 0.92
lintMetadataMethod · 0.92

Calls 1

NewSelectorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…