Rely on golangci-lint exit code instead of expecting empty output

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2025-03-24 19:36:01 +01:00
parent b78fa41e42
commit 11fc49b491

View File

@ -2,7 +2,7 @@
errors=$($GOBIN/golangci-lint run --build-tags "${BUILDTAGS}" 2>&1)
if [ -z "$errors" ]; then
if [ "$?" -eq 0 ]; then
echo 'Congratulations! All Go source files have been linted.'
else
{