From 06bc5d4d590d365c4cc72845dcdb69ba7223aaa2 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 19 Feb 2025 08:52:04 -0800 Subject: [PATCH] Makefile: Run golangci-lint config verify This more closely matches the behavior of the github action. In the .golangci.yml config file move the exclude-dirs list under issues where it belongs. --- .golangci.yml | 6 +++--- Makefile | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 345704360..ac9a60f06 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,3 @@ -exclude-dirs: - - vendor - linters-settings: govet: disable: @@ -23,6 +20,9 @@ run: timeout: 5m issues: + exclude-dirs: + - vendor + # Maximum issues count per one linter. Set to 0 to disable. Default is 50. max-issues-per-linter: 0 diff --git a/Makefile b/Makefile index aea6a5ffe..28cb2473e 100644 --- a/Makefile +++ b/Makefile @@ -356,6 +356,7 @@ SHELLCHECK_FILES=$(shell find . -name "*.sh" -not -regex "./vendor/.*") .PHONY: lint lint: $(GOLANGCI_LINT_CACHE_DIR) container_composer_golangci_built.info ./tools/prepare-source.sh + podman run -t --rm -v $(SRCDIR):/app:z -v $(GOLANGCI_LINT_CACHE_DIR):/root/.cache:z -w /app $(GOLANGCI_COMPOSER_IMAGE) golangci-lint config verify -v podman run -t --rm -v $(SRCDIR):/app:z -v $(GOLANGCI_LINT_CACHE_DIR):/root/.cache:z -w /app $(GOLANGCI_COMPOSER_IMAGE) golangci-lint run -v echo "$(SHELLCHECK_FILES)" | xargs shellcheck --shell bash -e SC1091 -e SC2002 -e SC2317