Skip to content

Commit

Permalink
Add golangci-lint to verify-golint.sh script
Browse files Browse the repository at this point in the history
Signed-off-by: Omer Aplatony <[email protected]>
  • Loading branch information
omerap12 committed Dec 3, 2024
1 parent cd58f3f commit 8ba1231
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hack/verify-golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8ba1231

Please sign in to comment.