Skip to content

Commit 9161fc9

Browse files
committed
bump golangci-lint version
typecheck linter does not play nice with go 1.20[1] bump golangci-lint version to 1.51.2 [1] golangci/golangci-lint#3420 Signed-off-by: adrianc <[email protected]>
1 parent 98f658c commit 9161fc9

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

.golangci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ linters-settings:
2525
min-complexity: 30
2626
goimports:
2727
local-prefixes: github.com/k8snetworkplumbingwg/accelerated-bridge-cni
28-
golint:
29-
min-confidence: 0
3028
gomnd:
3129
settings:
3230
mnd:
@@ -55,7 +53,6 @@ linters:
5553
disable-all: true
5654
enable:
5755
- bodyclose
58-
- deadcode
5956
- depguard
6057
- dogsled
6158
- dupl
@@ -79,13 +76,11 @@ linters:
7976
- revive
8077
- rowserrcheck
8178
- staticcheck
82-
- structcheck
8379
- stylecheck
8480
- typecheck
8581
- unconvert
8682
- unparam
8783
- unused
88-
- varcheck
8984
- whitespace
9085

9186
issues:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ GOLANGCI_LINT = $(BINDIR)/golangci-lint
3636
# golangci-lint version should be updated periodically
3737
# we keep it fixed to avoid it from unexpectedly failing on the project
3838
# in case of a version bump
39-
GOLANGCI_LINT_VER = v1.46.2
39+
GOLANGCI_LINT_VER = v1.51.2
4040
TIMEOUT = 15
4141
V = 0
4242
Q = $(if $(filter 1,$V),,@)

pkg/plugin/plugin.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ func (p *Plugin) updateDeviceInfo(cmdCtx *cmdContext) error {
219219
if err != nil {
220220
return fmt.Errorf("failed to marshal DeviceInfo to JSON %q", err)
221221
}
222+
//nolint:gosec
223+
// save with same permissions as https://github.com/k8snetworkplumbingwg/network-attachment-definition-client
224+
// utils.saveDeviceInfo
222225
err = os.WriteFile(cmdCtx.pluginConf.RuntimeConfig.CNIDeviceInfoFile, bytes, 0444)
223226
if err != nil {
224227
return fmt.Errorf("failed to update CNIDeviceInfoFile %q", err)

0 commit comments

Comments
 (0)