Skip to content

Commit

Permalink
dev: enable testifylint linter (#4595)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Mar 29, 2024
1 parent f96314f commit ec97551
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ linters:
- revive
- staticcheck
- stylecheck
- testifylint
- unconvert
- unparam
- unused
Expand Down Expand Up @@ -213,4 +214,3 @@ issues:

run:
timeout: 5m

2 changes: 1 addition & 1 deletion pkg/golinters/misspell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions pkg/result/processors/autogenerated_exclude_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/result/processors/skip_files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit ec97551

Please sign in to comment.