diff --git a/.golangci.yml b/.golangci.yml index d8235e494e556..f94af874581b0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -304,12 +304,15 @@ linters-settings: - error-nil - expected-actual - float-compare + - formatter - len - negative-positive - nil-compare - require-error + - suite-broken-parallel - suite-dont-use-pkg - suite-extra-assert-call + - suite-subtest-run - suite-thelper - useless-assert diff --git a/plugins/inputs/kube_inventory/client_test.go b/plugins/inputs/kube_inventory/client_test.go index d70f3603868a1..a90686b46ee5d 100644 --- a/plugins/inputs/kube_inventory/client_test.go +++ b/plugins/inputs/kube_inventory/client_test.go @@ -26,8 +26,8 @@ func toBoolPtr(b bool) *bool { func TestNewClient(t *testing.T) { _, err := newClient("https://127.0.0.1:443/", "default", "", "abc123", time.Second, tls.ClientConfig{}) - require.NoErrorf(t, err, "Failed to create new client - %v", err) + require.NoErrorf(t, err, "Failed to create new client: %v", err) _, err = newClient("https://127.0.0.1:443/", "default", "nonexistantFile", "", time.Second, tls.ClientConfig{}) - require.Errorf(t, err, "failed to read token file \"file\": open file: no such file or directory", err) + require.Errorf(t, err, "Failed to read token file \"file\": open file: no such file or directory: %v", err) } diff --git a/plugins/secretstores/docker/docker_test.go b/plugins/secretstores/docker/docker_test.go index 3f1cfbf44beba..788391a05a4e2 100644 --- a/plugins/secretstores/docker/docker_test.go +++ b/plugins/secretstores/docker/docker_test.go @@ -22,7 +22,7 @@ func TestPathNonExistent(t *testing.T) { ID: "non_existent_path_test", Path: "non/existent/path", } - require.ErrorContainsf(t, plugin.Init(), "accessing directory", "accessing directory %q failed: %w", plugin.Path, plugin.Init()) + require.ErrorContainsf(t, plugin.Init(), "accessing directory", "accessing directory %q failed: %v", plugin.Path, plugin.Init()) } func TestSetNotAvailable(t *testing.T) {