MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / NewLinter

Function NewLinter

config/lint.go:11–23  ·  view source on GitHub ↗

NewLinter returns Linter for given confFilePath

(conf *lint.Config)

Source from the content-addressed store, hash-verified

9
10// NewLinter returns Linter for given confFilePath
11func NewLinter(conf *lint.Config) (*lint.Linter, error) {
12 err := checkIfMinVersion(conf.MinVersion)
13 if err != nil {
14 return nil, err
15 }
16
17 rules, err := GetEnabledRules(conf)
18 if err != nil {
19 return nil, err
20 }
21
22 return lint.New(conf, rules)
23}
24
25// GetFormatter returns the formatter as defined in conf
26func GetFormatter(conf *lint.Config) (lint.Formatter, error) {

Callers 4

TestConfig_NewLinterFunction · 0.92
getLinterFunction · 0.92
LintMessageFunction · 0.85
TestDefaultLintFunction · 0.85

Calls 3

NewFunction · 0.92
checkIfMinVersionFunction · 0.85
GetEnabledRulesFunction · 0.85

Tested by 2

TestConfig_NewLinterFunction · 0.74
TestDefaultLintFunction · 0.68