From db09611e1a827cfb3b1989f2c3026b19fea2ec62 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Fri, 15 Apr 2022 19:59:49 -0500 Subject: [PATCH] refactor: silence lint issues (#307) --- executor/context_test.go | 6 +++--- mock/docker/docker.go | 1 + runtime/context_test.go | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/executor/context_test.go b/executor/context_test.go index 10607ba9..f8da2697 100644 --- a/executor/context_test.go +++ b/executor/context_test.go @@ -55,7 +55,7 @@ func TestExecutor_FromContext(t *testing.T) { want Engine }{ { - // nolint: staticcheck // ignore using string with context value + // nolint: staticcheck,revive // ignore using string with context value context: context.WithValue(context.Background(), key, _engine), want: _engine, }, @@ -64,7 +64,7 @@ func TestExecutor_FromContext(t *testing.T) { want: nil, }, { - // nolint: staticcheck // ignore using string with context value + // nolint: staticcheck,revive // ignore using string with context value context: context.WithValue(context.Background(), key, "foo"), want: nil, }, @@ -173,7 +173,7 @@ func TestExecutor_WithContext(t *testing.T) { t.Errorf("unable to create linux engine: %v", err) } - // nolint: staticcheck // ignore using string with context value + // nolint: staticcheck,revive // ignore using string with context value want := context.WithValue(context.Background(), key, _engine) // run test diff --git a/mock/docker/docker.go b/mock/docker/docker.go index 5b6a0604..eab1fb7b 100644 --- a/mock/docker/docker.go +++ b/mock/docker/docker.go @@ -23,6 +23,7 @@ const Version = "v1.40" // New returns a client that is capable of handling // Docker client calls and returning stub responses. +// nolint:revive // ignore unexported type as it is intentional func New() (*mock, error) { return &mock{ ConfigService: ConfigService{}, diff --git a/runtime/context_test.go b/runtime/context_test.go index 6145d73f..0e1dd9f7 100644 --- a/runtime/context_test.go +++ b/runtime/context_test.go @@ -29,7 +29,7 @@ func TestRuntime_FromContext(t *testing.T) { want Engine }{ { - // nolint: staticcheck // ignore using string with context value + // nolint: staticcheck,revive // ignore using string with context value context: context.WithValue(context.Background(), key, _engine), want: _engine, }, @@ -38,7 +38,7 @@ func TestRuntime_FromContext(t *testing.T) { want: nil, }, { - // nolint: staticcheck // ignore using string with context value + // nolint: staticcheck,revive // ignore using string with context value context: context.WithValue(context.Background(), key, "foo"), want: nil, }, @@ -109,7 +109,7 @@ func TestRuntime_WithContext(t *testing.T) { t.Errorf("unable to create runtime engine: %v", err) } - // nolint: staticcheck // ignore using string with context value + // nolint: staticcheck,revive // ignore using string with context value want := context.WithValue(context.Background(), key, _engine) // run test