Skip to content

Commit 90c8447

Browse files
committed
Add a linter to remind us about our internal package
We should probably extend our discovery runner the next time we want to use the discovery client.
1 parent 6ed6a69 commit 90c8447

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.golangci.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ linters-settings:
4040
- pkg: github.com/crunchydata/postgres-operator/internal/testing/*
4141
desc: The "internal/testing" packages should be used only in tests.
4242

43+
- pkg: k8s.io/client-go/discovery
44+
desc: Use the "internal/kubernetes" package instead.
45+
4346
tests:
4447
files: ['$test']
4548
deny:
@@ -93,6 +96,11 @@ linters-settings:
9396
issues:
9497
exclude-generated: strict
9598
exclude-rules:
99+
# This internal package is the one place we want to do API discovery.
100+
- linters: [depguard]
101+
path: internal/kubernetes/discovery.go
102+
text: k8s.io/client-go/discovery
103+
96104
# These value types have unmarshal methods.
97105
# https://github.com/raeperd/recvcheck/issues/7
98106
- linters: [recvcheck]

0 commit comments

Comments
 (0)