Skip to content

Commit fb349a1

Browse files
committed
linter: enable caching
1 parent 28e5880 commit fb349a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ ifneq ($(workers),)
2828
LINT_WORKERS = --concurrency=$(workers)
2929
endif
3030

31-
DOCKER_TOOLS = docker run -v $$(pwd):/build lndclient-tools
31+
DOCKER_TOOLS = docker run \
32+
--rm \
33+
-v $(shell bash -c "$(GOCC) env GOCACHE || (mkdir -p /tmp/go-cache; echo /tmp/go-cache)"):/tmp/build/.cache \
34+
-v $(shell bash -c "$(GOCC) env GOMODCACHE || (mkdir -p /tmp/go-modcache; echo /tmp/go-modcache)"):/tmp/build/.modcache \
35+
-v $(shell bash -c "mkdir -p /tmp/go-lint-cache; echo /tmp/go-lint-cache"):/root/.cache/golangci-lint \
36+
-v $$(pwd):/build lndclient-tools
3237

3338
GREEN := "\\033[0;32m"
3439
NC := "\\033[0m"

0 commit comments

Comments
 (0)