1
0
mirror of https://github.com/containers/skopeo.git synced 2025-05-07 07:26:47 +00:00
skopeo/hack/validate-lint.sh
Miloslav Trmač d4bd787e5f Use golangci-lint instead of golint
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00

17 lines
359 B
Bash
Executable File

#!/bin/bash
errors=$($GOBIN/golangci-lint run --build-tags "${BUILDTAGS}" 2>&1)
if [ -z "$errors" ]; 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