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

Function LintMessage

config/api.go:9–15  ·  view source on GitHub ↗

LintMessage lints commitMsg using the default configuration. It is the simplest entry point for programmatic use: no config file is needed. For custom configuration use Parse or NewDefault, then NewLinter.

(commitMsg string)

Source from the content-addressed store, hash-verified

7//
8// For custom configuration use Parse or NewDefault, then NewLinter.
9func LintMessage(commitMsg string) (*lint.Result, error) {
10 linter, err := NewLinter(NewDefault())
11 if err != nil {
12 return nil, err
13 }
14 return linter.ParseAndLint(commitMsg)
15}

Callers

nothing calls this directly

Calls 3

ParseAndLintMethod · 0.95
NewLinterFunction · 0.85
NewDefaultFunction · 0.85

Tested by

no test coverage detected