MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / NewWithParser

Function NewWithParser

lint/linter.go:28–33  ·  view source on GitHub ↗

NewWithParser returns a new Linter instance using parser for ParseAndLint.

(conf *Config, rules []Rule, parser commit.Parser)

Source from the content-addressed store, hash-verified

26
27// NewWithParser returns a new Linter instance using parser for ParseAndLint.
28func NewWithParser(conf *Config, rules []Rule, parser commit.Parser) (*Linter, error) {
29 if parser == nil {
30 return nil, errors.New("parser cannot be nil")
31 }
32 return newLinter(conf, rules, parser)
33}
34
35func newLinter(conf *Config, rules []Rule, parser commit.Parser) (*Linter, error) {
36 compiled, err := compilePatterns(conf.EffectiveIgnorePatterns())

Callers 2

NewLinterWithParserFunction · 0.92

Calls 1

newLinterFunction · 0.85

Tested by 1