diff --git a/hack/verify-golint.sh b/hack/verify-golint.sh index 436f950cb5c0..592d599ac45b 100755 --- a/hack/verify-golint.sh +++ b/hack/verify-golint.sh @@ -65,4 +65,14 @@ if [[ "${#bad_files[@]}" -ne 0 ]]; then exit 1 fi +echo "Running golangci-lint..." +# Build exclude pattern for golangci-lint +EXCLUDE_PATTERN=$(IFS='|'; echo "${excluded_packages[*]}") + +# Run golangci-lint +if ! golangci-lint run --skip-dirs-use-default --skip-dirs "${EXCLUDE_PATTERN}"; then + echo "!!! golangci-lint failed" + exit 1 +fi + # ex: ts=2 sw=2 et filetype=sh