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

Method lintData

internal/lint/data.go:11–29  ·  view source on GitHub ↗
(f *core.File)

Source from the content-addressed store, hash-verified

9)
10
11func (l *Linter) lintData(f *core.File) error {
12 for syntax, view := range l.Manager.Config.Views {
13 sec, err := glob.Compile(syntax)
14 if err != nil {
15 return err
16 } else if sec.Match(f.Path) {
17 found, berr := view.Apply(f)
18 if berr != nil {
19 return core.NewE201FromTarget(
20 berr.Error(),
21 fmt.Sprintf("View = %s", view),
22 l.Manager.Config.RootINI,
23 )
24 }
25 return l.lintScopedValues(f, found)
26 }
27 }
28 return nil
29}
30
31func (l *Linter) lintScopedValues(f *core.File, values []core.ScopedValues) error {
32 var err error

Callers 1

lintFileMethod · 0.95

Calls 5

lintScopedValuesMethod · 0.95
CompileFunction · 0.92
NewE201FromTargetFunction · 0.92
MatchMethod · 0.80
ApplyMethod · 0.80

Tested by

no test coverage detected