lnd/tools/Dockerfile
ziggie 13e7a6e782
tools: update golangci-lint to v2
The config file format changed. The tool golangci-lint migrate
was used to migrate the old config. However old comments and also
the structure of the disabled linters was preserved.

Moreover the new v2 version introduced new linters, we disable
3 of them because they are very noise and we do not really want
to check for them: funcorder, noinlineerr, embeddedstructfieldcheck.
2025-11-12 22:54:01 +08:00

18 lines
498 B
Docker

FROM golang:1.25.3
RUN apt-get update && apt-get install -y git
ENV GOCACHE=/tmp/build/.cache
ENV GOMODCACHE=/tmp/build/.modcache
COPY . /tmp/tools
RUN cd /tmp \
&& mkdir -p /tmp/build/.cache \
&& mkdir -p /tmp/build/.modcache \
&& cd /tmp/tools \
&& CGO_ENABLED=0 go tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint custom \
&& mv ./custom-gcl /usr/local/bin/custom-gcl \
&& chmod -R 777 /tmp/build/ \
&& git config --global --add safe.directory /build
WORKDIR /build