commit
1180e5eaf9
@ -12,3 +12,10 @@ for i in */ ; do
|
|||||||
$formatter -w -l "$@" "${i%?}"
|
$formatter -w -l "$@" "${i%?}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
msg=`script/lint`
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
echo "$msg"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
16
script/lint
Executable file
16
script/lint
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
deps=$(go list -f '{{join .Deps "\n"}}' . | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | grep -v "github.com/github/git-lfs")
|
||||||
|
|
||||||
|
# exit 0 means non-vendored deps were found
|
||||||
|
if [ $? -eq 0 ];
|
||||||
|
then
|
||||||
|
echo "Non vendored dependencies found:"
|
||||||
|
for d in $deps; do echo "\t$d"; done
|
||||||
|
echo
|
||||||
|
echo "These dependencies should be tracked in 'Nut.toml', with an import prefix of:"
|
||||||
|
echo "\tgithub.com/github/git-lfs/vendor/_nuts"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Looks good!"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user