@@ -20,7 +20,7 @@ func New(conf *Config, rules []Rule) (*Linter, error) {
2020}
2121
2222// Lint checks the given commitMsg string against rules
23- func (l * Linter ) Lint (commitMsg string ) (* Failure , error ) {
23+ func (l * Linter ) Lint (commitMsg string ) (* Result , error ) {
2424 msg , err := l .parser .Parse (commitMsg )
2525 if err != nil {
2626 return l .parserErrorRule (commitMsg , err )
@@ -29,8 +29,8 @@ func (l *Linter) Lint(commitMsg string) (*Failure, error) {
2929}
3030
3131// LintCommit checks the given Commit against rules
32- func (l * Linter ) LintCommit (msg Commit ) (* Failure , error ) {
33- res := newFailure (msg .Message ())
32+ func (l * Linter ) LintCommit (msg Commit ) (* Result , error ) {
33+ res := newResult (msg .Message ())
3434
3535 for _ , rule := range l .rules {
3636 currentRule := rule
@@ -44,21 +44,21 @@ func (l *Linter) LintCommit(msg Commit) (*Failure, error) {
4444 return res , nil
4545}
4646
47- func (l * Linter ) runRule (rule Rule , severity Severity , msg Commit ) (* RuleFailure , bool ) {
47+ func (l * Linter ) runRule (rule Rule , severity Severity , msg Commit ) (* Issue , bool ) {
4848 failMsgs , isOK := rule .Validate (msg )
4949 if isOK {
5050 return nil , true
5151 }
52- res := newRuleFailure (rule .Name (), failMsgs , severity )
52+ res := newIssue (rule .Name (), failMsgs , severity )
5353 return res , false
5454}
5555
56- func (l * Linter ) parserErrorRule (commitMsg string , err error ) (* Failure , error ) {
57- res := newFailure (commitMsg )
56+ func (l * Linter ) parserErrorRule (commitMsg string , err error ) (* Result , error ) {
57+ res := newResult (commitMsg )
5858
5959 errMsg := err .Error ()
6060
61- ruleFail := newRuleFailure ("parser" , []string {errMsg }, SeverityError )
61+ ruleFail := newIssue ("parser" , []string {errMsg }, SeverityError )
6262 res .add (ruleFail )
6363
6464 return res , nil
0 commit comments