From 08dc0564809ee8283d9cf90b818864e810f285b6 Mon Sep 17 00:00:00 2001 From: Kenichi Omichi Date: Tue, 16 Apr 2019 23:13:00 +0000 Subject: [PATCH] Replace `false` with `exit 1` Some scripts contained `false` for returning 1 to callers instead of `exit 1` and that works like: $ false $ echo $? 1 $ But that made confusion in a PR review process. So this replaces `false` with `exit 1` for long-term maintenance. --- hack/verify-golint.sh | 6 +++--- hack/verify-shellcheck.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hack/verify-golint.sh b/hack/verify-golint.sh index 3f365cbeb7..79508a9adb 100755 --- a/hack/verify-golint.sh +++ b/hack/verify-golint.sh @@ -94,7 +94,7 @@ else echo 'checking by adding it to hack/.golint_failures (if your reviewer is okay with it).' echo } >&2 - false + exit 1 fi if [[ ${#not_failing[@]} -gt 0 ]]; then @@ -106,7 +106,7 @@ if [[ ${#not_failing[@]} -gt 0 ]]; then done echo } >&2 - false + exit 1 fi if [[ ${#gone[@]} -gt 0 ]]; then @@ -118,5 +118,5 @@ if [[ ${#gone[@]} -gt 0 ]]; then done echo } >&2 - false + exit 1 fi diff --git a/hack/verify-shellcheck.sh b/hack/verify-shellcheck.sh index 7b2e4372fc..c948d4520a 100755 --- a/hack/verify-shellcheck.sh +++ b/hack/verify-shellcheck.sh @@ -169,7 +169,7 @@ else echo 'checking by adding it to hack/.shellcheck_failures (if your reviewer is okay with it).' echo } >&2 - false + exit 1 fi if [[ ${#not_failing[@]} -gt 0 ]]; then @@ -181,7 +181,7 @@ if [[ ${#not_failing[@]} -gt 0 ]]; then done echo } >&2 - false + exit 1 fi # Check that all failing_packages actually still exist @@ -199,5 +199,5 @@ if [[ ${#gone[@]} -gt 0 ]]; then done echo } >&2 - false + exit 1 fi