Skip to content

Commit

Permalink
ci: run golangci-lint only if tool is present
Browse files Browse the repository at this point in the history
This is used to mitigate CI failure when go get fails
for golangci-lint (ref golangci/golangci-lint#595)
  • Loading branch information
mewmew committed Jul 2, 2019
1 parent b85e615 commit 8d40201
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ if [ "${COVERALLS_TOKEN}" ]; then
goveralls -coverprofile coverage.out -service travis-ci -repotoken ${COVERALLS_TOKEN}
fi

echo "### GolangCI-Lint"
golangci-lint run --enable-all
GOLANGCI_LINT_FAIL=$?
echo
if [ -x "$(command -v golangci-lint)" ]; then
echo "### GolangCI-Lint"
golangci-lint run --enable-all
GOLANGCI_LINT_FAIL=$?
echo
fi

RET=0
if [ ${GOFMT_FAIL} -eq 1 ] ; then
Expand Down

0 comments on commit 8d40201

Please sign in to comment.