1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-25 21:29:16 +02:00

fix: adhere to "Rule of Silence" (#198)

Makes stylish formatter respect "Rule of Silence"
See http://www.linfo.org/rule_of_silence.html

Fixes #165
This commit is contained in:
Oleg Gaidarenko 2019-07-29 21:55:35 +03:00 committed by Minko Gechev
parent 5ae9226dc5
commit 03c3312c2c

View File

@ -82,7 +82,8 @@ func (f *Stylish) Format(failures <-chan lint.Failure, config lint.RulesConfig)
} else if total > 0 && totalErrors == 0 {
suffix = color.YellowString("\n ✖" + suffix)
} else {
suffix = color.GreenString("\n" + suffix)
suffix, output = "", ""
}
return output + suffix, nil
}