From b14cefd48593fc7dd2d66ba0fdde8458e79cb037 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Mon, 17 Feb 2025 11:04:32 +0200 Subject: [PATCH] ci: fix .golangi.yml against JSONSchema validator golangci-lint config can be verified using the followint command: golangci-lint config verify Our config had some errors so fix them. Signed-off-by: Mikko Ylinen --- .golangci.yml | 6 +----- cmd/gpu_plugin/gpu_plugin_test.go | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c094331f..5bc7b42d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,8 +2,6 @@ run: tests: true build-tags: - kerneldrv - max-issues-per-linter: 0 - max-same-issues: 0 linters: disable-all: true @@ -47,14 +45,12 @@ linters-settings: disabled: true gofmt: simplify: true - golint: - min-confidence: 0.9 goconst: ignore-tests: true govet: - shadow: true enable: - "fieldalignment" + - "shadow" gocyclo: min-complexity: 15 gocognit: diff --git a/cmd/gpu_plugin/gpu_plugin_test.go b/cmd/gpu_plugin/gpu_plugin_test.go index 492e2ee6..aadf9684 100644 --- a/cmd/gpu_plugin/gpu_plugin_test.go +++ b/cmd/gpu_plugin/gpu_plugin_test.go @@ -973,7 +973,7 @@ func TestPciDeviceForCard(t *testing.T) { cardPath := filepath.Join(sysfs, "class", "drm", "card0") cardDevicePath := filepath.Join(cardPath, "device") - if err := os.MkdirAll(cardDevicePath, 0750); err != nil { + if err = os.MkdirAll(cardDevicePath, 0750); err != nil { t.Fatalf("Card device path creation failed: %+v", err) } @@ -999,7 +999,7 @@ func TestPciDeviceForCard(t *testing.T) { cardPath = filepath.Join(sysfs, "class", "drm", "card1") cardDevicePath = filepath.Join(cardPath, "device") - if err := os.MkdirAll(cardDevicePath, 0750); err != nil { + if err = os.MkdirAll(cardDevicePath, 0750); err != nil { t.Fatalf("Card device path creation failed: %+v", err) }