Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tools/lint-go-gopls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ IGNORE_PATTERNS=(
# because the tool does not set non-zero exit code when errors are found.
# ref: https://github.com/golang/go/issues/67078
ERROR_LINES=$("$GO" run "$GOPLS_PACKAGE" check -severity=warning "$@" 2>/dev/null | grep -E "^$PWD" | grep -vFf <(printf '%s\n' "${IGNORE_PATTERNS[@]}"));
NUM_ERRORS=$(echo -n "$ERROR_LINES" | wc -l)

if [ -z "$ERROR_LINES" ]; then
NUM_ERRORS="0"
else
NUM_ERRORS=$(echo "$ERROR_LINES" | wc -l)
fi

if [ "$NUM_ERRORS" -eq "0" ]; then
exit 0;
Expand Down