Skip to content

Commit 8690a90

Browse files
synaretephlogistonjohn
authored andcommitted
golangci-lint: enable extra checks for 'govet'
Make govet linter extra pedantic by enabling almost all checks. This in turn revealed a minor dead-if in smbshare. Signed-off-by: Shachar Sharon <[email protected]>
1 parent f58f13c commit 8690a90

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.golangci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ linters-settings:
4343
funlen:
4444
lines: 188
4545
statements: 60
46+
govet:
47+
check-shadowing: true
48+
enable-all: true
49+
disable:
50+
- fieldalignment
51+
- shadow
4652
lll:
4753
line-length: 98
4854
revive:

internal/resources/smbshare.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func (m *SmbShareManager) Finalize(
324324
m.logger.Info("Updated config map during Finalize")
325325
return Requeue
326326
}
327-
} else if err != nil && !errors.IsNotFound(err) {
327+
} else if !errors.IsNotFound(err) {
328328
return Result{err: err}
329329
}
330330

0 commit comments

Comments
 (0)