Skip to content

dev: enable testifylint linter #4595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
Loading