Skip to content

Commit 437a252

Browse files
committed
Loosen linter rule for package names and fix an SA issue
1 parent e680d6a commit 437a252

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ linters:
121121
- linters:
122122
- revive
123123
text: 'exported: exported method .*\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported'
124+
# To be fixed: This is done to unblock the bumping of golint.
125+
- linters:
126+
- revive
127+
text: 'var-naming: avoid meaningless package names'
124128
- linters:
125129
- errcheck
126130
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?(S|s)?etenv). is not checked

test/helpers/envtest.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ func (t *TestEnvironment) WaitForWebhooks() {
240240
port := t.env.WebhookInstallOptions.LocalServingPort
241241
klog.V(2).Infof("Waiting for webhook port %d to be open prior to running tests", port)
242242
timeout := 1 * time.Second
243+
d := net.Dialer{Timeout: timeout}
243244
for {
244245
time.Sleep(timeout)
245-
conn, err := net.DialTimeout("tcp", net.JoinHostPort("127.0.0.1", strconv.Itoa(port)), timeout)
246+
conn, err := d.DialContext(context.Background(), "tcp", net.JoinHostPort("127.0.0.1", strconv.Itoa(port)))
246247
if err != nil {
247248
klog.V(2).Infof("Webhook port is not ready, will retry in %v: %s", timeout, err)
248249
continue

0 commit comments

Comments
 (0)