Skip to content

Commit

Permalink
Bump golangci-lint to 1.50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skitt committed Oct 19, 2022
1 parent 349d746 commit 63abdf9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ linters:
- bodyclose
- contextcheck
# - cyclop # This is equivalent to gocyclo
- deadcode
- depguard
- dogsled
- dupl
Expand Down Expand Up @@ -90,7 +89,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 @@ -101,7 +99,6 @@ linters:
- unconvert
- unparam
- unused
- varcheck
# - varnamelen # It doesn't seem necessary to enforce a minimum variable name length
- wastedassign
- whitespace
Expand Down Expand Up @@ -142,3 +139,11 @@ issues:
- gochecknoinits
- goerr113
- wrapcheck

# Ignore complaints about the URL to the Apache license
- path: test/e2e/e2e_test.go
linters:
- gci
- gofmt
- gofumpt
- goimports
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.0 \
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/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 @@ -245,7 +245,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 @@ -299,7 +299,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 63abdf9

Please sign in to comment.