From 3296c15a3249dc59e6eb782e3ef107061ff1bad1 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Wed, 1 Mar 2017 21:38:39 -0800 Subject: [PATCH] test: run unused and gosimple over all packages at once fmt pass went from ~20 CPU minutes to ~1 CPU minute. Fixes #7377 --- test | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/test b/test index b6bfbbf8c..13c514ed8 100755 --- a/test +++ b/test @@ -224,26 +224,22 @@ function fmt_pass { if which gosimple >/dev/null; then echo "Checking gosimple..." - for path in $GOSIMPLE_UNUSED_PATHS; do - simplResult=`gosimple ${path} 2>&1 || true` - if [ -n "${simplResult}" ]; then - echo -e "gosimple checking ${path} failed:\n${simplResult}" - exit 255 - fi - done + simplResult=`gosimple ${GOSIMPLE_UNUSED_PATHS} 2>&1 || true` + if [ -n "${simplResult}" ]; then + echo -e "gosimple checking failed:\n${simplResult}" + exit 255 + fi else echo "Skipping gosimple..." fi if which unused >/dev/null; then echo "Checking unused..." - for path in $GOSIMPLE_UNUSED_PATHS; do - unusedResult=`unused ${path} 2>&1 || true` - if [ -n "${unusedResult}" ]; then - echo -e "unused checking ${path} failed:\n${unusedResult}" - exit 255 - fi - done + unusedResult=`unused ${GOSIMPLE_UNUSED_PATHS} 2>&1 || true` + if [ -n "${unusedResult}" ]; then + echo -e "unused checking failed:\n${unusedResult}" + exit 255 + fi else echo "Skipping unused..." fi