(conf *Config, rules []Rule, parser commit.Parser)
| 33 | } |
| 34 | |
| 35 | func 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 |
| 50 | func (l *Linter) ParseAndLint(commitMsg string) (*Result, error) { |
no test coverage detected