From ce5cc746f99c2d3a9731cdb4594dd66741e263d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 19:19:18 -0400 Subject: [PATCH] =?UTF-8?q?chore(deps):=20update=20golangci/golangci-lint?= =?UTF-8?q?=20(v2.0.2=20=E2=86=92=20v2.1.2)=20(#1903)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update golangci/golangci-lint (v2.0.2 → v2.1.2) | datasource | package | from | to | | --------------- | ---------------------- | ------ | ------ | | github-releases | golangci/golangci-lint | v2.0.2 | v2.1.2 | * fix linter errors Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --------- Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --- .github/workflows/golangci-lint.yml | 2 +- .golangci.yml | 1 + Makefile | 4 ++-- proxmox/ssh/client.go | 2 +- proxmoxtf/resource/vm/vm.go | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index d8b70dd0..09bbfb6b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -42,6 +42,6 @@ jobs: if: ${{ steps.filter.outputs.go == 'true' || steps.filter.outputs.linter == 'true'}} uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7 with: - version: v2.0.2 # renovate: depName=golangci/golangci-lint datasource=github-releases + version: v2.1.2 # renovate: depName=golangci/golangci-lint datasource=github-releases skip-cache: true args: -v --timeout=10m diff --git a/.golangci.yml b/.golangci.yml index 9a21cc07..6c21625d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,6 +9,7 @@ linters: - exhaustruct - forcetypeassert - funlen + - funcorder # nice to have, but currently generating too many errors - gocognit - gocyclo - ireturn diff --git a/Makefile b/Makefile index 5a19fceb..3c6a13b6 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ TARGETS=darwin linux windows TERRAFORM_PLUGIN_EXTENSION= VERSION=0.75.0# x-release-please-version -GOLANGCI_LINT_VERSION=v2.0.2# renovate: depName=golangci/golangci-lint datasource=github-releases +GOLANGCI_LINT_VERSION=v2.1.2# renovate: depName=golangci/golangci-lint datasource=github-releases # check if opentofu is installed and use it if it is, # otherwise use terraform @@ -113,7 +113,7 @@ testacc: lint: # NOTE: This target is for local runs only. For linting in CI see .github/workflows/golangci-lint.yml @docker run -t --rm -v $$(pwd):/app -v ~/.cache/golangci-lint/$(GOLANGCI_LINT_VERSION):/root/.cache -w /app golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) golangci-lint fmt - @docker run -t --rm -v $$(pwd):/app -v ~/.cache/golangci-lint/$(GOLANGCI_LINT_VERSION):/root/.cache -w /app golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) golangci-lint run + @docker run -t --rm -v $$(pwd):/app -v ~/.cache/golangci-lint/$(GOLANGCI_LINT_VERSION):/root/.cache -w /app golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) golangci-lint run --fix .PHONY: release-build release-build: diff --git a/proxmox/ssh/client.go b/proxmox/ssh/client.go index cab0e787..e6c022c8 100644 --- a/proxmox/ssh/client.go +++ b/proxmox/ssh/client.go @@ -336,7 +336,7 @@ func (c *client) NodeStreamUpload( if d.Mode != "" { parsedFileMode, parseErr := strconv.ParseUint(d.Mode, 8, 12) if parseErr != nil { - return fmt.Errorf("failed to parse file mode %q: %w", d.Mode, err) + return fmt.Errorf("failed to parse file mode %q: %w", d.Mode, parseErr) } mode := uint32(parsedFileMode) diff --git a/proxmoxtf/resource/vm/vm.go b/proxmoxtf/resource/vm/vm.go index d4dcfe04..100acc3c 100644 --- a/proxmoxtf/resource/vm/vm.go +++ b/proxmoxtf/resource/vm/vm.go @@ -3857,7 +3857,7 @@ func vmReadCustom( // from the default qcow2, so we need to read it from the storage API to make sure we have the correct value volume, err := client.Node(nodeName).Storage(fileIDParts[0]).GetDatastoreFile(ctx, vmConfig.EFIDisk.FileVolume) if err != nil { - diags = append(diags, diag.FromErr(e)...) + diags = append(diags, diag.FromErr(err)...) } else { efiDisk[mkEFIDiskFileFormat] = volume.FileFormat }