NewLinter returns Linter for given conf using the default parser
(conf *lint.Config)
| 10 | |
| 11 | // NewLinter returns Linter for given conf using the default parser |
| 12 | func NewLinter(conf *lint.Config) (*lint.Linter, error) { |
| 13 | rules, err := initLinterRules(conf) |
| 14 | if err != nil { |
| 15 | return nil, err |
| 16 | } |
| 17 | |
| 18 | return lint.New(conf, rules) |
| 19 | } |
| 20 | |
| 21 | // NewLinterWithParser returns Linter for given conf and custom parser |
| 22 | func NewLinterWithParser(conf *lint.Config, parser commit.Parser) (*lint.Linter, error) { |