Skip to content

Commit

Permalink
Merge pull request etcd-io#7502 from gyuho/scripts
Browse files Browse the repository at this point in the history
test: mask go1.8 gosimple warnings
  • Loading branch information
gyuho authored Mar 15, 2017
2 parents ace3a21 + a958895 commit eed4a3f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,17 @@ function fmt_pass {

if which gosimple >/dev/null; then
echo "Checking gosimple..."
simplResult=`gosimple ${STATIC_ANALYSIS_PATHS} 2>&1 || true`
if [ -n "${simplResult}" ]; then
echo -e "gosimple checking failed:\n${simplResult}"
gosimpleResult=`gosimple ${STATIC_ANALYSIS_PATHS} 2>&1 || true`
if [ ! -n "${gosimpleResult}" ]; then
continue
fi
# TODO: resolve these after go1.8 migration
SIMPLE_CHECK_MASK="S(1024)"
if egrep -v "$SIMPLE_CHECK_MASK" "${gosimpleResult}"; then
echo -e "gosimple checking ${path} failed:\n${gosimpleResult}"
exit 255
else
echo -e "gosimple warning:\n${gosimpleResult}"
fi
else
echo "Skipping gosimple..."
Expand Down

0 comments on commit eed4a3f

Please sign in to comment.