diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 210dca2b..bada82ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: - uses: golangci/golangci-lint-action@v3 with: version: v1.55.2 - args: --timeout 5m + args: --verbose + skip-cache: true - name: Test run: go test ./... diff --git a/.golangci.yml b/.golangci.yml index 9c2d2204..edea0803 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,6 +15,7 @@ linters: - misspell - nakedret - revive + - testifylint linters-settings: gocritic: # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks. @@ -34,5 +35,20 @@ linters-settings: recommendations: - errors - fmt + testifylint: + disable: + - float-compare + - go-require + enable: + - bool-compare + - compares + - empty + - error-is-as + - error-nil + - expected-actual + - len + - require-error + - suite-dont-use-pkg + - suite-extra-assert-call run: - timeout: 2m + timeout: 5m diff --git a/dotenv/godotenv_var_expansion_test.go b/dotenv/godotenv_var_expansion_test.go index 99729cba..f80fe7fd 100644 --- a/dotenv/godotenv_var_expansion_test.go +++ b/dotenv/godotenv_var_expansion_test.go @@ -5,6 +5,7 @@ import ( "github.com/compose-spec/compose-go/v2/template" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var envMap = map[string]string{ @@ -43,7 +44,7 @@ func TestExpandIfEmptyOrUnset(t *testing.T) { for _, expected := range templateResults { t.Run(expected.name, func(t *testing.T) { result, err := expandVariables(expected.input, envMap, notFoundLookup) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, result, expected.result) }) } @@ -75,7 +76,7 @@ func TestExpandIfUnset(t *testing.T) { for _, expected := range templateResults { t.Run(expected.name, func(t *testing.T) { result, err := expandVariables(expected.input, envMap, notFoundLookup) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, result, expected.result) }) }