1
0
Fork 0
mirror of https://github.com/Luzifer/share.git synced 2024-10-19 05:44:23 +00:00
share/vendor/github.com/spf13/pflag/verify/golint.sh

16 lines
314 B
Bash
Raw Normal View History

2017-12-02 14:25:54 +00:00
#!/bin/bash
ROOT=$(dirname "${BASH_SOURCE}")/..
GOLINT=${GOLINT:-"golint"}
pushd "${ROOT}" > /dev/null
bad_files=$($GOLINT -min_confidence=0.9 ./...)
if [[ -n "${bad_files}" ]]; then
echo "!!! '$GOLINT' problems: "
echo "${bad_files}"
exit 1
fi
popd > /dev/null
# ex: ts=2 sw=2 et filetype=sh