Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce make lint/go execution time by adding the GOCACHE environment variable #4628

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

@karamaru-alpha karamaru-alpha Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading