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

Function newLinter

lint/linter.go:35–47  ·  view source on GitHub ↗
(conf *Config, rules []Rule, parser commit.Parser)

Source from the content-addressed store, hash-verified

33}
34
35func newLinter(conf *Config, rules []Rule, parser commit.Parser) (*Linter, error) {
36 compiled, err := compilePatterns(conf.EffectiveIgnorePatterns())
37 if err != nil {
38 return nil, err
39 }
40
41 return &Linter{
42 conf: conf,
43 rules: rules,
44 parser: parser,
45 ignorePatterns: compiled,
46 }, nil
47}
48
49// ParseAndLint checks the given commitMsg string against rules
50func (l *Linter) ParseAndLint(commitMsg string) (*Result, error) {

Callers 2

NewFunction · 0.85
NewWithParserFunction · 0.85

Calls 2

compilePatternsFunction · 0.85

Tested by

no test coverage detected