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

Function getLinter

internal/cmd/lint.go:64–81  ·  view source on GitHub ↗
(confParam string)

Source from the content-addressed store, hash-verified

62}
63
64func getLinter(confParam string) (*lint.Linter, lint.Formatter, error) {
65 conf, err := getConfig(confParam)
66 if err != nil {
67 return nil, nil, err
68 }
69
70 format, err := config.GetFormatter(conf)
71 if err != nil {
72 return nil, nil, err
73 }
74
75 linter, err := config.NewLinter(conf)
76 if err != nil {
77 return nil, nil, err
78 }
79
80 return linter, format, nil
81}
82
83func getConfig(confParam string) (*lint.Config, error) {
84 if confParam != "" {

Callers 1

runLintFunction · 0.85

Calls 3

GetFormatterFunction · 0.92
NewLinterFunction · 0.92
getConfigFunction · 0.85

Tested by

no test coverage detected