Skip to content

Commit

Permalink
Reduce make lint/go execution time by adding the GOCACHE environmen…
Browse files Browse the repository at this point in the history
…t variable (#4628)

* Add GOCACHE env to lint/go

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>

* Add verbose flag to lint/go

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>

* Change timeout golangci.yml

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>

---------

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>
  • Loading branch information
karamaru-alpha authored Oct 24, 2023
1 parent d427bab commit 7278abe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
deadline: 5m
timeout: 15m
skip-files:
- ^.*\.(pb|y)\.go$
skip-dirs:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ run/site:
.PHONY: lint/go
lint/go: FIX ?= false
lint/go: VERSION ?= sha256:78d1bbd01a9886a395dc8374218a6c0b7b67694e725dd76f0c8ac1de411b85e8 #v1.46.2
lint/go: FLAGS ?= --rm --platform linux/amd64 -e GOLANGCI_LINT_CACHE=/repo/.cache/golangci-lint -v ${PWD}:/repo -w /repo -it
lint/go: FLAGS ?= --rm --platform linux/amd64 -e GOCACHE=/repo/.cache/go-build -e GOLANGCI_LINT_CACHE=/repo/.cache/golangci-lint -v ${PWD}:/repo -w /repo -it
lint/go:
ifeq ($(FIX),true)
docker run ${FLAGS} golangci/golangci-lint@${VERSION} golangci-lint run --fix
docker run ${FLAGS} golangci/golangci-lint@${VERSION} golangci-lint run -v --fix
else
docker run ${FLAGS} golangci/golangci-lint@${VERSION} golangci-lint run
docker run ${FLAGS} golangci/golangci-lint@${VERSION} golangci-lint run -v
endif

.PHONY: lint/web
Expand Down

0 comments on commit 7278abe

Please sign in to comment.