0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 02:31:10 +00:00

address review comments & fixes

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
Pavel Boldyrev 2025-05-24 17:26:22 +00:00
parent 2162d212ac
commit fb0a13755d
No known key found for this signature in database
GPG Key ID: 637146A2A6804C59
5 changed files with 23 additions and 17 deletions

View File

@ -1,15 +1,14 @@
ARG GO_VERSION=1.24.3
FROM golang:1.24.3
ARG GOLANGCI_LINT_VERSION=2.1.6 # renovate: depName=golangci/golangci-lint datasource=github-releases
FROM golang:${GO_VERSION}
# install docker
RUN apt update && apt upgrade -y && apt-get install -y ca-certificates curl gnupg lsb-release jq zsh neovim && \
RUN apt update && apt upgrade -y && \
apt-get install --no-install-recommends -y ca-certificates curl gnupg lsb-release jq zsh neovim && \
chsh -s $(which zsh) && \
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
rm -rf /var/lib/apt/lists/*
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v${GOLANGCI_LINT_VERSION}
RUN curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh && \

View File

@ -50,8 +50,7 @@
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go"
"go.useLanguageServer": true
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
# Display welcome banner
echo -e "\033[1;36m"

View File

@ -54,8 +54,16 @@ If you are using VS Code, feel free to copy `settings.json` from `.vscode/settin
## Devcontainer support
The project uses a devcontainer to provide a consistent development environment.
If you are using VS Code, you can use the devcontainer by opening the project in a container.
Prerequisites:
- Docker (or Docker Desktop) installed on your machine
- [VS Code Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
To launch the devcontainer:
1. Open the project in VS Code.
2. Run **Remote-Containers: Open Folder in Container** from the Command Palette.
See [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers) for more details.
## Testing

View File

@ -116,11 +116,11 @@ lint: ensure-golangci-lint
golangci-lint run --fix
.PHONY: ensure-golangci-lint
ensure-golangci-lint:
@CURRENT_VERSION=$$(golangci-lint version --short 2>/dev/null || echo "not installed"); \
ensure-golangci-lint:
@CURRENT_VERSION=$$(golangci-lint version --short 2>/dev/null | sed 's/^v//' || echo "not installed"); \
if [ "$$CURRENT_VERSION" != "$(GOLANGCI_LINT_VERSION)" ]; then \
echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION) (current: $$CURRENT_VERSION)"; \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin $(GOLANGCI_LINT_VERSION); \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v$(GOLANGCI_LINT_VERSION); \
fi
.PHONY: release-build