ci: no-exit: Allow path override for os.Exit check

Allow the path being checked by the os-no-exit script to be
passed in, and update the Makefile to use that to check the
current code paths of the cli and virtcontainers.

Fixes: #477

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
Graham Whaley 2018-07-10 15:14:24 +01:00
parent 6268ba4aa3
commit 62495d45be
2 changed files with 5 additions and 2 deletions

View File

@ -6,7 +6,9 @@
# Check there are no os.Exit() calls creeping into the code
# We don't use that exit path in the Kata codebase.
go_packages=.
# Allow the path to check to be over-ridden.
# Default to the current directory.
go_packages=${1:-.}
echo "Checking for no os.Exit() calls for package [${go_packages}]"

View File

@ -395,7 +395,8 @@ go-test: $(GENERATED_FILES)
check-go-static:
$(QUIET_CHECK).ci/static-checks.sh
$(QUIET_CHECK).ci/go-no-os-exit.sh
$(QUIET_CHECK).ci/go-no-os-exit.sh ./cli
$(QUIET_CHECK).ci/go-no-os-exit.sh ./virtcontainers
coverage:
$(QUIET_TEST).ci/go-test.sh html-coverage