Skip to content

Commit fb85e69

Browse files
refactor(formatter): change params order in writeRuleFailure
1 parent cbf329d commit fb85e69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

formatter/default.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ func writeFailure(res *lint.Failure) string {
3737

3838
errs, warns, others := bySeverity(res)
3939

40-
writeRuleFailure(str, "Errors", errs, "❌")
41-
writeRuleFailure(str, "Warnings", warns, "!")
42-
writeRuleFailure(str, "Other Severities", others, "?")
40+
writeRuleFailure(str, "", "Errors", errs)
41+
writeRuleFailure(str, "!", "Warnings", warns)
42+
writeRuleFailure(str, "?", "Other Severities", others)
4343

4444
fmt.Fprintf(str, "\n\nTotal %d errors, %d warnings, %d other severities", len(errs), len(warns), len(others))
4545
return strings.Trim(str.String(), "\n")
4646
}
4747

48-
func writeRuleFailure(w *strings.Builder, title string, resArr []*lint.RuleFailure, sign string) {
48+
func writeRuleFailure(w *strings.Builder, sign, title string, resArr []*lint.RuleFailure) {
4949
if len(resArr) == 0 {
5050
return
5151
}

0 commit comments

Comments
 (0)