Skip to content

Commit d4e2ca5

Browse files
authored
Merge pull request #3326 from helio/release-1.7-3242
[release-1.7] upgrade golangci-lint
2 parents 0db7325 + 6739bd3 commit d4e2ca5

File tree

6 files changed

+7
-22
lines changed

6 files changed

+7
-22
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ENVSUBST_VER := v2.0.0-20210730161058-179042472c46
8181
ENVSUBST_BIN := envsubst
8282
ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN)-$(ENVSUBST_VER)
8383

84-
GOLANGCI_LINT_VER := v1.50.0
84+
GOLANGCI_LINT_VER := v1.51.2
8585
GOLANGCI_LINT_BIN := golangci-lint
8686
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
8787

azure/regional_baseuri.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ import (
2424
"github.com/pkg/errors"
2525
)
2626

27-
type aliasAuth = Authorizer
27+
// aliasAuth helps to embed the interface Authorize since the Authorizer interface also defines an Authorizer method and
28+
// the compiler gets confused without a type alias (or renaming the method Authorizer).
29+
type aliasAuth Authorizer
2830

2931
// baseURIAdapter wraps an azure.Authorizer and adds a region to the BaseURI. This is useful if you need to make direct
3032
// calls to a specific Azure region. One possible case is to avoid replication delay when listing resources within a

azure/services/privatedns/privatedns_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,6 @@ var (
8989
},
9090
}
9191

92-
unmanagedTags = resources.TagsResource{
93-
Properties: &resources.Tags{
94-
Tags: map[string]*string{
95-
"foo": to.StringPtr("bar"),
96-
"something": to.StringPtr("else"),
97-
},
98-
},
99-
}
100-
10192
notDoneError = azure.NewOperationNotDoneError(&infrav1.Future{Type: "resourceType", ResourceGroup: resourceGroup, Name: "resourceName"})
10293
errFake = errors.New("this is an error")
10394
notFoundError = autorest.DetailedError{StatusCode: 404}

azure/services/virtualnetworks/virtualnetworks_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ var (
4343
ClusterName: "test-cluster",
4444
AdditionalTags: map[string]string{"foo": "bar"},
4545
}
46-
managedVnet = network.VirtualNetwork{
47-
ID: to.StringPtr("/subscriptions/subscription/resourceGroups/test-group/providers/Microsoft.Network/virtualNetworks/test-vnet"),
48-
Name: to.StringPtr("test-vnet"),
49-
Tags: map[string]*string{
50-
"foo": to.StringPtr("bar"),
51-
"sigs.k8s.io_cluster-api-provider-azure_cluster_test-cluster": to.StringPtr("owned"),
52-
},
53-
}
5446

5547
managedTags = resources.TagsResource{
5648
Properties: &resources.Tags{

hack/tools/tools.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build tools
2-
// +build tools
1+
//go:build capztools
2+
// +build capztools
33

44
/*
55
Copyright 2020 The Kubernetes Authors.

scripts/go_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ fi
4040
rm "${GOBIN}/${2}"* 2> /dev/null || true
4141

4242
# install the golang module specified as the first argument
43-
go install -tags tools "${1}@${3}"
43+
go install -tags capztools "${1}@${3}"
4444
mv "${GOBIN}/${2}" "${GOBIN}/${2}-${3}"
4545
ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}"

0 commit comments

Comments
 (0)