From f6ba24524fd83b84f1a245290659b1afb12c8ae5 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Sun, 16 Feb 2020 19:16:01 -0700 Subject: [PATCH] validate examples in pre-commit --- hooks.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hooks.sh b/hooks.sh index 5a35350..40692cb 100755 --- a/hooks.sh +++ b/hooks.sh @@ -1,12 +1,5 @@ #!/usr/bin/env bash -function make_badge () { - ./manage.py line-count-badge - if [[ ! $? == 0 ]]; then - exit 1 - fi -} - function isort_all () { isort -y hyperglass/*.py if [[ ! $? == 0 ]]; then @@ -18,6 +11,13 @@ function isort_all () { fi } +function validate_examples () { + python3 ./tests/validate_examples.py + if [[! $? == 0]]; then + exit 1 + fi +} + # make_badge # isort_all