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

Function NewLinter

config/lint.go:12–19  ·  view source on GitHub ↗

NewLinter returns Linter for given conf using the default parser

(conf *lint.Config)

Source from the content-addressed store, hash-verified

10
11// NewLinter returns Linter for given conf using the default parser
12func 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
22func NewLinterWithParser(conf *lint.Config, parser commit.Parser) (*lint.Linter, error) {

Callers 13

TestConfig_NewLinterFunction · 0.92
TestSyntaxFooterRulesFunction · 0.92
TestLintRecoveredIssuesFunction · 0.92
BenchmarkParseAndLintFunction · 0.92
getLinterFunction · 0.92
LintMessageFunction · 0.85

Calls 2

NewFunction · 0.92
initLinterRulesFunction · 0.85