From 5610c882086bee22ae7ef5e2a66513d593215818 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 16 May 2024 14:11:17 +0200 Subject: [PATCH] [build] add go-lint earthly target --- Earthfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Earthfile b/Earthfile index a8848e71..85d96c9d 100644 --- a/Earthfile +++ b/Earthfile @@ -3,6 +3,7 @@ VERSION --arg-scope-and-set --global-cache 0.8 ARG --global go_version = 1.22 ARG --global node_version = 18 ARG --global rust_version = 1.76 +ARG --global golangci_lint_version = 1.57.1 ARG --global go_builder_image = "golang:${go_version}-alpine" ARG --global node_builder_image = "node:${node_version}" @@ -164,6 +165,12 @@ go-test-all: BUILD +go-test --GOARCH="${GOARCH}" --GOOS="${GOOS}" --GOARM="${GOARM}" END +go-lint: + FROM +go-base + + RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v${golangci_lint_version} + RUN golangci-lint run -c ./.golangci.yml --timeout 15m --show-stats + # Builds portmaster-start, portmaster-core, hub and notifier for all supported platforms go-release: FROM ${work_image}