diff --git a/lint b/lint index 080713486..600a94f2c 100755 --- a/lint +++ b/lint @@ -82,12 +82,12 @@ function lint_go { # don't have it installed. if type golint >/dev/null 2>&1; then # golint doesn't set an exit code it seems - if [ "$IGNORE_LINT_COMMENT" = "1" ]; then - lintoutput=$(golint "${filename}" | grep -vE 'comment|dot imports') - else + if [ -z "$IGNORE_LINT_COMMENT" ]; then lintoutput=$(golint "${filename}") + else + lintoutput=$(golint "${filename}" | grep -vE 'comment|dot imports') fi - if [ "$lintoutput" != "" ]; then + if [ -n "$lintoutput" ]; then lint_result=1 echo "$lintoutput" fi