0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-29 18:21:10 +00:00

chore(deps): update golangci/golangci-lint (v2.0.2 → v2.1.2) (#1903)

* 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>
This commit is contained in:
renovate[bot] 2025-04-16 19:19:18 -04:00 committed by GitHub
parent 9277a600dd
commit ce5cc746f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -9,6 +9,7 @@ linters:
- exhaustruct
- forcetypeassert
- funlen
- funcorder # nice to have, but currently generating too many errors
- gocognit
- gocyclo
- ireturn

View File

@ -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:

View File

@ -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)

View File

@ -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
}