lint: Exit and give instructions when linter missing
Signed-off-by: Steve Milner <smilner@redhat.com>
This commit is contained in:
parent
6c4a508fc9
commit
9c240aed8e
1 changed files with 11 additions and 1 deletions
12
.tool/lint
12
.tool/lint
|
@ -4,9 +4,19 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
# Create the linter path for use later
|
||||||
|
LINTER=${GOPATH}/bin/gometalinter
|
||||||
|
|
||||||
|
# Make sure gometalinter is installed
|
||||||
|
if [ ! -f ${LINTER} ]; then
|
||||||
|
echo >&2 "gometalinter must be installed. Please run 'make install.tools' and try again"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
PKGS=$(find . -type d -not -path . -a -not -iwholename '*.git*' -a -not -iname '.tool' -a -not -iwholename '*vendor*' -a -not -iname 'hack' -a -not -iwholename '*.artifacts*' -a -not -iwholename '*contrib*' -a -not -iwholename '*test*' -a -not -iwholename '*logo*' -a -not -iwholename '*conmon*' -a -not -iwholename '*completions*' -a -not -iwholename '*docs*' -a -not -iwholename '*pause*')
|
PKGS=$(find . -type d -not -path . -a -not -iwholename '*.git*' -a -not -iname '.tool' -a -not -iwholename '*vendor*' -a -not -iname 'hack' -a -not -iwholename '*.artifacts*' -a -not -iwholename '*contrib*' -a -not -iwholename '*test*' -a -not -iwholename '*logo*' -a -not -iwholename '*conmon*' -a -not -iwholename '*completions*' -a -not -iwholename '*docs*' -a -not -iwholename '*pause*')
|
||||||
|
|
||||||
${GOPATH}/bin/gometalinter \
|
# Execute the linter
|
||||||
|
${LINTER} \
|
||||||
--concurrency=4\
|
--concurrency=4\
|
||||||
--enable-gc\
|
--enable-gc\
|
||||||
--vendored-linters\
|
--vendored-linters\
|
||||||
|
|
Loading…
Reference in a new issue