Skip to content

Commit

Permalink
Bump golangci-lint to 1.50.1
Browse files Browse the repository at this point in the history
  • Loading branch information
skitt committed Nov 14, 2022
1 parent 76a378f commit ea3811c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ linters:
- bodyclose
- contextcheck
# - cyclop # This is equivalent to gocyclo
- deadcode
- depguard
- dogsled
- dupl
Expand Down Expand Up @@ -107,7 +106,6 @@ linters:
# - scopelint # Deprecated since v1.39.0
# - sqlclosecheck # We don't use SQL
- staticcheck
- structcheck
- stylecheck
# - tagliatelle # Inconsistent with stylecheck and not as good
# - tenv # Not relevant for our Ginkgo UTs
Expand All @@ -118,7 +116,6 @@ linters:
- unconvert
- unparam
- unused
- varcheck
# - varnamelen # It doesn't seem necessary to enforce a minimum variable name length
- wastedassign
- whitespace
Expand Down
2 changes: 1 addition & 1 deletion package/Dockerfile.shipyard-dapper-base
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN dnf -y install --nodocs --setopt=install_weak_deps=False \
find /usr/bin /usr/lib/golang /usr/libexec -type f -executable -newercc /proc -size +1M ! -name hyperkube \( -execdir upx ${UPX_LEVEL} {} \; -o -true \) && \
ln -f /usr/bin/kubectl /usr/bin/hyperkube

ENV LINT_VERSION=v1.47.3 \
ENV LINT_VERSION=v1.50.1 \
HELM_VERSION=v3.9.0 \
KIND_VERSION=v0.15.0 \
BUILDX_VERSION=v0.8.2 \
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/clusterglobalegressip.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func AwaitAllocatedEgressIPs(client dynamic.ResourceInterface, name string) []st
func() (interface{}, error) {
resGip, err := client.Get(context.TODO(), name, metav1.GetOptions{})
if apierrors.IsNotFound(err) {
return nil, nil // nolint:nilnil // We want to repeat but let the checker known that nothing was found.
return nil, nil //nolint:nilnil // We want to repeat but let the checker known that nothing was found.
}
return resGip, err
},
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (d *Docker) RunCommandUntil(command ...string) (string, string) {
stdout, stderr, cmdErr = d.runCommand(command...)
if cmdErr != nil {
Logf("Error attempting to run %v: %v", append([]string{}, command...), cmdErr)
return false, nil // nolint:nilerr // Returning nil value is intentional
return false, nil //nolint:nilerr // Returning nil value is intentional
}
return true, nil
})
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func DetectGlobalnet() {
AwaitUntil("find Clusters to detect if Globalnet is enabled", func() (interface{}, error) {
clusters, err := clusters.List(context.TODO(), metav1.ListOptions{})
if apierrors.IsNotFound(err) {
return nil, nil // nolint:nilnil // We want to repeat but let the checker known that nothing was found.
return nil, nil //nolint:nilnil // We want to repeat but let the checker known that nothing was found.
}
return clusters, err
}, func(result interface{}) (bool, string, error) {
Expand Down Expand Up @@ -337,7 +337,7 @@ func fetchClusterIDs() {
daemonSet := AwaitUntil(fmt.Sprintf("find %s DaemonSet for %q", name, TestContext.ClusterIDs[i]), func() (interface{}, error) {
ds, err := KubeClients[i].AppsV1().DaemonSets(TestContext.SubmarinerNamespace).Get(context.TODO(), name, metav1.GetOptions{})
if apierrors.IsNotFound(err) {
return nil, nil // nolint:nilnil // We want to repeat but let the checker known that nothing was found.
return nil, nil //nolint:nilnil // We want to repeat but let the checker known that nothing was found.
}

return ds, err
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/framework/gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (f *Framework) AwaitGatewayWithStatus(cluster ClusterIndex, name, status st
func() (interface{}, error) {
resGw, err := gwClient.Get(context.TODO(), name, metav1.GetOptions{})
if apierrors.IsNotFound(err) {
return nil, nil // nolint:nilnil // We want to repeat but let the checker known that nothing was found.
return nil, nil //nolint:nilnil // We want to repeat but let the checker known that nothing was found.
}
return resGw, err
},
Expand Down Expand Up @@ -112,7 +112,7 @@ func (f *Framework) AwaitGatewayFullyConnected(cluster ClusterIndex, name string
func() (interface{}, error) {
resGw, err := gwClient.Get(context.TODO(), name, metav1.GetOptions{})
if apierrors.IsNotFound(err) {
return nil, nil // nolint:nilnil // We want to repeat but let the checker known that nothing was found.
return nil, nil //nolint:nilnil // We want to repeat but let the checker known that nothing was found.
}
return resGw, err
},
Expand Down Expand Up @@ -177,7 +177,7 @@ func (f *Framework) DeleteGateway(cluster ClusterIndex, name string) {
AwaitUntil("delete gateway", func() (interface{}, error) {
err := gatewayClient(cluster).Delete(context.TODO(), name, metav1.DeleteOptions{})
if apierrors.IsNotFound(err) {
return nil, nil // nolint:nilnil // We want to repeat but let the checker known that nothing was found.
return nil, nil //nolint:nilnil // We want to repeat but let the checker known that nothing was found.
}
return nil, err
}, NoopCheckResult)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/globalingressips.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (f *Framework) AwaitGlobalIngressIP(cluster ClusterIndex, name, namespace s
func() (interface{}, error) {
resGip, err := gipClient.Get(context.TODO(), name, metav1.GetOptions{})
if apierrors.IsNotFound(err) {
return nil, nil // nolint:nilnil // We want to repeat but let the checker known that nothing was found.
return nil, nil //nolint:nilnil // We want to repeat but let the checker known that nothing was found.
}
return resGip, err
},
Expand Down

0 comments on commit ea3811c

Please sign in to comment.