github.com/snyk/vervet/v3@v3.7.0/internal/linter/linter.go (about) 1 package linter 2 3 import ( 4 "context" 5 6 "github.com/snyk/vervet/v3/config" 7 ) 8 9 // A Linter checks that a set of spec files conform to some set of rules and 10 // standards. 11 type Linter interface { 12 // Match returns a slice of logical paths to spec files that should be 13 // linted from the given resource set configuration. 14 Match(*config.ResourceSet) ([]string, error) 15 16 // WithOverride returns a new instance of a Linter with the given configuration. 17 WithOverride(ctx context.Context, cfg *config.Linter) (Linter, error) 18 19 // Run executes the linter checks on the given spec files. 20 Run(ctx context.Context, root string, files ...string) error 21 }