From 262b5913c77eb4a6781eb4b017ddf1a8944a0110 Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Mon, 31 Jan 2022 09:12:53 +0100 Subject: [PATCH] build(make): deletes cache before running lint --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 172d70f..eb9090c 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,18 @@ GO := go +ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +CACHE_DIR := $(ROOT_DIR)/.cache + GORELEASER := $(GO) run github.com/goreleaser/goreleaser@v1.3.1 + +export GOLANGCI_LINT_CACHE := $(CACHE_DIR)/golangci-lint GOLANGCI_LINT := $(GO) run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.0 + GOTESTSUM := $(GO) run gotest.tools/gotestsum@v1.7.0 .PHONY: lint lint: + rm -rf $(GOLANGCI_LINT_CACHE) $(GOLANGCI_LINT) run \ --enable-all \ --disable=godox,varnamelen \