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

Method parserErrorRule

lint/linter.go:144–153  ·  view source on GitHub ↗
(commitMsg string, err error)

Source from the content-addressed store, hash-verified

142}
143
144func (l *Linter) parserErrorRule(commitMsg string, err error) []*Issue {
145 var infos []string
146 if line, col, ok := commit.DiagnosticPosition(commitMsg, err); ok {
147 infos = []string{fmt.Sprintf("line %d, column %d", line, col)}
148 }
149 issue := NewIssue(err.Error(), infos...)
150 issue.ruleName = "parser"
151 issue.severity = SeverityError
152 return []*Issue{issue}
153}

Callers 1

ParseAndLintMethod · 0.95

Calls 3

DiagnosticPositionFunction · 0.92
NewIssueFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected