Skip to content

Commit eef741a

Browse files
dimsk8s-publishing-bot
authored andcommitted
Linter to ensure go-cmp/cmp is used ONLY in tests
Signed-off-by: Davanum Srinivas <[email protected]> Kubernetes-commit: 4e05bc20db99ff89b2d2205218d24b9935a7fdd7
1 parent 5979ae2 commit eef741a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

config/testing/helpers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"path/filepath"
2424
"testing"
2525

26-
"github.com/google/go-cmp/cmp"
26+
"github.com/google/go-cmp/cmp" //nolint:depguard
2727
"k8s.io/apimachinery/pkg/runtime"
2828
"k8s.io/apimachinery/pkg/runtime/schema"
2929
"k8s.io/apimachinery/pkg/runtime/serializer"

config/testing/roundtrip.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"path/filepath"
2323
"testing"
2424

25-
"github.com/google/go-cmp/cmp"
25+
"github.com/google/go-cmp/cmp" //nolint:depguard
2626
apiequality "k8s.io/apimachinery/pkg/api/equality"
2727
"k8s.io/apimachinery/pkg/runtime"
2828
"k8s.io/apimachinery/pkg/runtime/schema"

logs/api/v1/options.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"sync/atomic"
2828
"time"
2929

30-
"github.com/google/go-cmp/cmp"
30+
"github.com/google/go-cmp/cmp" //nolint:depguard
3131
"github.com/spf13/pflag"
3232

3333
"k8s.io/klog/v2"

0 commit comments

Comments
 (0)