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}