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:
parent
9277a600dd
commit
ce5cc746f9
2
.github/workflows/golangci-lint.yml
vendored
2
.github/workflows/golangci-lint.yml
vendored
@ -42,6 +42,6 @@ jobs:
|
|||||||
if: ${{ steps.filter.outputs.go == 'true' || steps.filter.outputs.linter == 'true'}}
|
if: ${{ steps.filter.outputs.go == 'true' || steps.filter.outputs.linter == 'true'}}
|
||||||
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7
|
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7
|
||||||
with:
|
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
|
skip-cache: true
|
||||||
args: -v --timeout=10m
|
args: -v --timeout=10m
|
||||||
|
@ -9,6 +9,7 @@ linters:
|
|||||||
- exhaustruct
|
- exhaustruct
|
||||||
- forcetypeassert
|
- forcetypeassert
|
||||||
- funlen
|
- funlen
|
||||||
|
- funcorder # nice to have, but currently generating too many errors
|
||||||
- gocognit
|
- gocognit
|
||||||
- gocyclo
|
- gocyclo
|
||||||
- ireturn
|
- ireturn
|
||||||
|
4
Makefile
4
Makefile
@ -3,7 +3,7 @@ TARGETS=darwin linux windows
|
|||||||
TERRAFORM_PLUGIN_EXTENSION=
|
TERRAFORM_PLUGIN_EXTENSION=
|
||||||
VERSION=0.75.0# x-release-please-version
|
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,
|
# check if opentofu is installed and use it if it is,
|
||||||
# otherwise use terraform
|
# otherwise use terraform
|
||||||
@ -113,7 +113,7 @@ testacc:
|
|||||||
lint:
|
lint:
|
||||||
# NOTE: This target is for local runs only. For linting in CI see .github/workflows/golangci-lint.yml
|
# 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 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
|
.PHONY: release-build
|
||||||
release-build:
|
release-build:
|
||||||
|
@ -336,7 +336,7 @@ func (c *client) NodeStreamUpload(
|
|||||||
if d.Mode != "" {
|
if d.Mode != "" {
|
||||||
parsedFileMode, parseErr := strconv.ParseUint(d.Mode, 8, 12)
|
parsedFileMode, parseErr := strconv.ParseUint(d.Mode, 8, 12)
|
||||||
if parseErr != nil {
|
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)
|
mode := uint32(parsedFileMode)
|
||||||
|
@ -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
|
// 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)
|
volume, err := client.Node(nodeName).Storage(fileIDParts[0]).GetDatastoreFile(ctx, vmConfig.EFIDisk.FileVolume)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
diags = append(diags, diag.FromErr(e)...)
|
diags = append(diags, diag.FromErr(err)...)
|
||||||
} else {
|
} else {
|
||||||
efiDisk[mkEFIDiskFileFormat] = volume.FileFormat
|
efiDisk[mkEFIDiskFileFormat] = volume.FileFormat
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user