disable the congrats message

There is now an extra switch '-s' to disable the congrats message when
there are no issues detected

Fixes: #110
This commit is contained in:
Henrik Johansson 2018-06-15 14:34:54 +02:00 committed by Isaev Denis
parent 2de1f87c10
commit f239b80ce1
7 changed files with 25 additions and 8 deletions

View file

@ -33,6 +33,12 @@ func checkNoIssuesRun(t *testing.T, out string, exitCode int) {
assert.Equal(t, "Congrats! No issues were found.\n", out)
}
func TestCongratsMessageGoneIfSilent(t *testing.T) {
out, exitCode := runGolangciLint(t, "../...", "-s")
assert.Equal(t, exitcodes.Success, exitCode)
assert.Equal(t, "", out)
}
func TestCongratsMessageIfNoIssues(t *testing.T) {
out, exitCode := runGolangciLint(t, "../...")
checkNoIssuesRun(t, out, exitCode)