From d66183b1299e50c6a5a64702878e93aec205b3cf Mon Sep 17 00:00:00 2001
From: Kir Kolyshkin <kolyshkin@gmail.com>
Date: Thu, 3 Apr 2025 17:00:11 -0700
Subject: [PATCH] Remove hack/validate-lint.sh wrapper

Before commit d4bd787e this script used to contain some logic,
but now it's just a wrapper that does nothing useful and stands in the
way. Remove it, and call golangci-lint directly.

This slightly changes the way the linting is done, because BUILDTAGS
was empty before, and now they it contains libsubid.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 Makefile              |  2 +-
 hack/validate-lint.sh | 16 ----------------
 2 files changed, 1 insertion(+), 17 deletions(-)
 delete mode 100755 hack/validate-lint.sh

diff --git a/Makefile b/Makefile
index 179bf4da..d7da7f74 100644
--- a/Makefile
+++ b/Makefile
@@ -237,7 +237,7 @@ test-all-local: validate-local validate-docs test-unit-local
 validate-local:
 	hack/validate-git-marks.sh
 	hack/validate-gofmt.sh
-	GOBIN=$(GOBIN) hack/validate-lint.sh
+	$(GOBIN)/golangci-lint run --build-tags "${BUILDTAGS}"
 	BUILDTAGS="${BUILDTAGS}" hack/validate-vet.sh
 
 # This invokes bin/skopeo, hence cannot be run as part of validate-local
diff --git a/hack/validate-lint.sh b/hack/validate-lint.sh
deleted file mode 100755
index e1e339b2..00000000
--- a/hack/validate-lint.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-errors=$($GOBIN/golangci-lint run --build-tags "${BUILDTAGS}" 2>&1)
-
-if [ "$?" -eq 0 ]; then
-	echo 'Congratulations!  All Go source files have been linted.'
-else
-	{
-		echo "Errors from golangci-lint:"
-		echo "$errors"
-		echo
-		echo 'Please fix the above errors. You can test via "golangci-lint" and commit the result.'
-		echo
-	} >&2
-	exit 1
-fi