forked from toolshed/abra
Reformat linting errors in LintForErrors
See toolshed/organising#497 (comment)
This commit is contained in:
@ -201,13 +201,13 @@ func LintForErrors(recipe recipe.Recipe) error {
|
|||||||
errors += fmt.Sprintf("\nlint %s: %s", rule.Ref, err)
|
errors += fmt.Sprintf("\nlint %s: %s", rule.Ref, err)
|
||||||
}
|
}
|
||||||
if !ok {
|
if !ok {
|
||||||
errors += fmt.Sprintf("\nlint error in %s configs: \"%s\" failed lint checks (%s)", recipe.Name, rule.Description, rule.Ref)
|
errors += fmt.Sprintf("\n * %s (%s)", rule.Description, rule.Ref)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len(errors) > 0) {
|
if (len(errors) > 0) {
|
||||||
return fmt.Errorf(errors[1:])
|
return fmt.Errorf("recipe '%s' failed lint checks:\n" + errors[1:], recipe.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debugf("linting successful, %s is well configured", recipe.Name)
|
log.Debugf("linting successful, %s is well configured", recipe.Name)
|
||||||
|
Reference in New Issue
Block a user