Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
ci: no-exit: Allow path override for os.Exit check
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Graham Whaley authored and Eric Ernst committed Aug 23, 2018
1 parent 1b23e15 commit b71cae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .ci/go-no-os-exit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}]"

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b71cae0

Please sign in to comment.