dev: enable testifylint linter (#4595)

This commit is contained in:
Oleksandr Redko 2024-03-29 16:38:00 +02:00 committed by GitHub
parent f96314f5a3
commit ec9755157e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 3 deletions

View File

@ -133,6 +133,7 @@ linters:
- revive
- staticcheck
- stylecheck
- testifylint
- unconvert
- unparam
- unused
@ -213,4 +214,3 @@ issues:
run:
timeout: 5m

View File

@ -29,7 +29,7 @@ func Test_appendExtraWords(t *testing.T) {
expected := []string{"iff", "if", "cancelation", "cancellation"}
assert.Equal(t, replacer.Replacements, expected)
assert.Equal(t, expected, replacer.Replacements)
}
func Test_appendExtraWords_error(t *testing.T) {

View File

@ -252,6 +252,7 @@ func Test_shouldPassIssue_error(t *testing.T) {
pass, err := p.shouldPassIssue(test.issue)
//nolint:testifylint // It's a loop and the main expectation is the error message.
assert.EqualError(t, err, test.expected)
assert.False(t, pass)
})

View File

@ -49,6 +49,6 @@ func TestSkipFiles(t *testing.T) {
func TestSkipFilesInvalidPattern(t *testing.T) {
p, err := NewSkipFiles([]string{"\\o"}, "")
assert.Error(t, err)
require.Error(t, err)
assert.Nil(t, p)
}