diff --git a/scripts/git-hooks/pre-commit b/scripts/git-hooks/pre-commit index 71b8cca6e..7a3d680a4 100755 --- a/scripts/git-hooks/pre-commit +++ b/scripts/git-hooks/pre-commit @@ -11,6 +11,7 @@ exec 1>&2 EXIT=0 RED='\033[0;31m' +YELLOW='\033[0;33m' NOCOLOR='\033[0m' if [ -d ./venv/ ]; then @@ -22,6 +23,11 @@ if [ -d ./venv/ ]; then fi fi +if [ ${NOVALIDATE} ]; then + echo "${YELLOW}Skipping validation checks${NOCOLOR}" + exit $EXIT +fi + echo "Validating PEP8 compliance..." pycodestyle --ignore=W504,E501 --exclude=node_modules netbox/ if [ $? != 0 ]; then