mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
parent
9ec959f08e
commit
b900926bfc
7 changed files with 19 additions and 35 deletions
|
@ -22,7 +22,7 @@ import (
|
|||
var root = filepath.Join("..", "...")
|
||||
var installOnce sync.Once
|
||||
|
||||
const noIssuesOut = "Congrats! No issues were found.\n"
|
||||
const noIssuesOut = ""
|
||||
|
||||
func installBinary(t assert.TestingT) {
|
||||
installOnce.Do(func() {
|
||||
|
@ -36,8 +36,8 @@ func checkNoIssuesRun(t *testing.T, out string, exitCode int) {
|
|||
assert.Equal(t, noIssuesOut, out)
|
||||
}
|
||||
|
||||
func TestCongratsMessageGoneIfSilent(t *testing.T) {
|
||||
out, exitCode := runGolangciLint(t, "../...", "-s")
|
||||
func TestNoCongratsMessage(t *testing.T) {
|
||||
out, exitCode := runGolangciLint(t, "../...")
|
||||
assert.Equal(t, exitcodes.Success, exitCode)
|
||||
assert.Equal(t, "", out)
|
||||
}
|
||||
|
@ -72,7 +72,6 @@ func TestDeadline(t *testing.T) {
|
|||
out, exitCode := runGolangciLint(t, "--deadline=1ms", root)
|
||||
assert.Equal(t, exitcodes.Timeout, exitCode)
|
||||
assert.Contains(t, out, "deadline exceeded: try increase it by passing --deadline option")
|
||||
assert.NotContains(t, out, "Congrats! No issues were found.")
|
||||
}
|
||||
|
||||
func runGolangciLint(t *testing.T, args ...string) (string, int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue