Skip to content

Commit 8d40201

Browse files
committed
ci: run golangci-lint only if tool is present
This is used to mitigate CI failure when go get fails for golangci-lint (ref golangci/golangci-lint#595)
1 parent b85e615 commit 8d40201

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ci_checks.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ if [ "${COVERALLS_TOKEN}" ]; then
5151
goveralls -coverprofile coverage.out -service travis-ci -repotoken ${COVERALLS_TOKEN}
5252
fi
5353

54-
echo "### GolangCI-Lint"
55-
golangci-lint run --enable-all
56-
GOLANGCI_LINT_FAIL=$?
57-
echo
54+
if [ -x "$(command -v golangci-lint)" ]; then
55+
echo "### GolangCI-Lint"
56+
golangci-lint run --enable-all
57+
GOLANGCI_LINT_FAIL=$?
58+
echo
59+
fi
5860

5961
RET=0
6062
if [ ${GOFMT_FAIL} -eq 1 ] ; then

0 commit comments

Comments
 (0)