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

Function NewLinterWithParser

config/lint.go:22–29  ·  view source on GitHub ↗

NewLinterWithParser returns Linter for given conf and custom parser

(conf *lint.Config, parser commit.Parser)

Source from the content-addressed store, hash-verified

20
21// NewLinterWithParser returns Linter for given conf and custom parser
22func NewLinterWithParser(conf *lint.Config, parser commit.Parser) (*lint.Linter, error) {
23 rules, err := initLinterRules(conf)
24 if err != nil {
25 return nil, err
26 }
27
28 return lint.NewWithParser(conf, rules, parser)
29}
30
31func initLinterRules(conf *lint.Config) ([]lint.Rule, error) {
32 if err := checkIfMinVersion(conf.MinVersion); err != nil {

Callers 1

Calls 2

NewWithParserFunction · 0.92
initLinterRulesFunction · 0.85

Tested by 1