Skip to content

Commit a5c44d2

Browse files
committed
go1.11 compatibility fixed
1 parent be0679e commit a5c44d2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/linters_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99
"strings"
1010
"testing"
1111

12-
"github.com/golangci/golangci-lint/pkg/exitcodes"
13-
1412
"github.com/golangci/golangci-lint/test/testshared"
1513

1614
assert "github.com/stretchr/testify/require"
@@ -20,9 +18,12 @@ import (
2018

2119
func runGoErrchk(c *exec.Cmd, files []string, t *testing.T) {
2220
output, err := c.CombinedOutput()
23-
exitErr, ok := err.(*exec.ExitError)
21+
assert.Error(t, err)
22+
_, ok := err.(*exec.ExitError)
2423
assert.True(t, ok)
25-
assert.Equal(t, exitcodes.IssuesFound, exitErr.ExitCode())
24+
25+
// TODO: uncomment after deprecating go1.11
26+
// assert.Equal(t, exitcodes.IssuesFound, exitErr.ExitCode())
2627

2728
fullshort := make([]string, 0, len(files)*2)
2829
for _, f := range files {

0 commit comments

Comments
 (0)