Skip to content

Commit

Permalink
test: add naked return checks
Browse files Browse the repository at this point in the history
Signed-off-by: Gyu-Ho Lee <[email protected]>
  • Loading branch information
gyuho committed Nov 11, 2017
1 parent 0b03d22 commit 65a606e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,17 @@ function fmt_pass {
echo "Skipping ineffassign..."
fi

if which nakedret >/dev/null; then
echo "Checking nakedret..."
nakedretResult=$(nakedret "${STATIC_ANALYSIS_PATHS[@]}" 2>&1 || true)
if [ -n "${nakedretResult}" ]; then
echo -e "nakedret checking failed:\n${nakedretResult}"
exit 255
fi
else
echo "Skipping nakedret..."
fi

echo "Checking for license header..."
licRes=""
files=$(find . -type f -iname '*.go' ! -path './cmd/*' ! -path './gopath.proto/*')
Expand Down

0 comments on commit 65a606e

Please sign in to comment.