make: dockerize linter

This commit is contained in:
sputn1ck 2022-05-20 08:56:21 +02:00
parent 1741896e33
commit f0bf9302cc
No known key found for this signature in database
GPG key ID: 671103D881A5F0E4
7 changed files with 1615 additions and 16 deletions

16
tools/Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM golang:1.18.0-buster
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 \
&& go install -trimpath -tags=tools github.com/golangci/golangci-lint/cmd/golangci-lint \
&& chmod -R 777 /tmp/build/
WORKDIR /build

5
tools/go.mod Normal file
View file

@ -0,0 +1,5 @@
module github.com/lightninglabs/loop/tools
go 1.16
require github.com/golangci/golangci-lint v1.46.2 // indirect

1474
tools/go.sum Normal file

File diff suppressed because it is too large Load diff

8
tools/tools.go Normal file
View file

@ -0,0 +1,8 @@
//go:build tools
// +build tools
package loop
import (
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
)