Skip to content

Commit 18007a2

Browse files
committed
Update golangci-lint to newer version
This patch updates the golangci-lint tool to v1.21.0 in order to speed up the linting to avoid the issue golangci/golangci-lint#685.
1 parent 2a8c784 commit 18007a2

File tree

4 files changed

+190
-72
lines changed

4 files changed

+190
-72
lines changed

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ linters:
2020
disable-all: true
2121
# Run with --fast=false for more extensive checks
2222
fast: true
23+
run:
24+
skip-files:
25+
- ".*zz_generated.*\\.go"
2326
issue:
2427
max-same-issues: 0
2528
max-per-linter: 0

controllers/vspheremachine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (r machineReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr er
245245
// If the resources are the same resource version, then a previous
246246
// patch may not have resulted in any changes. Check to see if the
247247
// remote status is the same as the local status.
248-
if cmp.Diff(localObj, remoteObj) == "" {
248+
if cmp.Equal(localObj.Status, remoteObj.Status) {
249249
machineContext.Logger.Info(
250250
"resource patch was not required",
251251
"local-resource-version", localObj.ResourceVersion,

hack/tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.12
44

55
require (
66
github.com/golang/mock v1.3.1
7-
github.com/golangci/golangci-lint v1.18.0
7+
github.com/golangci/golangci-lint v1.21.0
88
sigs.k8s.io/controller-tools v0.2.0
99
sigs.k8s.io/kustomize/v3 v3.1.0
1010
sigs.k8s.io/testing_frameworks v0.1.1

0 commit comments

Comments
 (0)