Skip to content

Commit

Permalink
Added tests via staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
skx committed Aug 24, 2019
1 parent 1d63d7a commit fa36e73
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
# Install the lint-tool, and the shadow-tool
go get -u golang.org/x/lint/golint
go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
go get -u honnef.co/go/tools/cmd/staticcheck


# Run the static-check tool - we ignore errors relating to case
t=$(mktemp)
staticcheck -checks all ./... | grep -v ALL_CAPS > $t
if [ -s $t ]; then
echo "Found errors via 'staticcheck':"
cat $t
rm $t
exit 1
fi
rm $t


# At this point failures cause aborts
set -e
Expand Down

0 comments on commit fa36e73

Please sign in to comment.