NewWithParser returns a new Linter instance using parser for ParseAndLint.
(conf *Config, rules []Rule, parser commit.Parser)
| 26 | |
| 27 | // NewWithParser returns a new Linter instance using parser for ParseAndLint. |
| 28 | func 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 | |
| 35 | func newLinter(conf *Config, rules []Rule, parser commit.Parser) (*Linter, error) { |
| 36 | compiled, err := compilePatterns(conf.EffectiveIgnorePatterns()) |