Skip to content

Commit 617945a

Browse files
authored
Merge pull request #291 from microsoft/adammartini/pipeline-fix
Pipeline fix: bump golangci and linters
2 parents 571d384 + 72c8d0a commit 617945a

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

.golangci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
run:
22
deadline: 3m
3+
issues:
34
skip-dirs:
45
- mock*
56
skip-files:
67
- "zz_generated.*\\.go$"
78
- ".*conversion.*\\.go$"
89
linters:
910
enable:
10-
- golint
1111
- govet
1212
- gofmt
13-
- structcheck
14-
- varcheck
15-
- interfacer
1613
- unconvert
1714
- ineffassign
1815
- goconst
1916
# - gocyclo
20-
- maligned
2117
- misspell
2218
- nakedret
2319
- prealloc
2420
- gosec
25-
- deadcode
2621
disable-all: true
2722
# Run with --fast=false for more extensive checks
2823
fast: true

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ ENVSUBST_VER := v2.0.0-20210730161058-179042472c46
8686
ENVSUBST_BIN := envsubst
8787
ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN)-$(ENVSUBST_VER)
8888

89-
GOLANGCI_LINT_VER := v1.54.1
89+
GOLANGCI_LINT_VER := v1.64.5
9090
GOLANGCI_LINT_BIN := golangci-lint
9191
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
9292

93-
KUSTOMIZE_VER := v5.0.3
93+
KUSTOMIZE_VER := v5.6.0
9494
KUSTOMIZE_BIN := kustomize
9595
KUSTOMIZE := $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER)
9696

controllers/azurestackhciloadbalancer_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ func (r *AzureStackHCILoadBalancerReconciler) reconcileLoadBalancerServiceStatus
263263
loadBalancerScope.SetAddress(*((*lb.FrontendIPConfigurations)[0].IPAddress))
264264
}
265265

266-
loadBalancerScope.SetReadyReplicas(int32(lb.ReplicationCount))
266+
// Assume that overflow will not happen for G115
267+
loadBalancerScope.SetReadyReplicas(int32(lb.ReplicationCount)) //nolint
267268
return nil
268269
}
269270

controllers/azurestackhciloadbalancer_virtualmachine.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ func (r *AzureStackHCILoadBalancerReconciler) updateReplicaStatus(lbs *scope.Loa
356356

357357
// getMachineReplicaCounts calculates the replica counts for the AzureStackHCIVirtualMachines associated with the load balancer
358358
func (r *AzureStackHCILoadBalancerReconciler) getMachineReplicaCounts(vmList []*infrav1.AzureStackHCIVirtualMachine) (replicas, failedReplicas int32) {
359-
replicas = int32(len(vmList))
359+
// Assume replicas will be under uniteger overflow for G115
360+
replicas = int32(len(vmList)) //nolint
360361
for _, vm := range vmList {
361362
if vm.Status.VMState == nil {
362363
continue

0 commit comments

Comments
 (0)