.bin/lint-code
#!/bin/bash
BASE_DIR=$( realpath $( dirname "${BASH_SOURCE[0]}" )/../ )
source "$BASE_DIR/.bin/lib/common.sh"
setLintModules
pushd "$ROOT_PATH" 2>&1 >/dev/null
echo "Running isort..."
isort -c .
exit_code=$?
echo
echo "Running black..."
black --check .
test $? -eq 0 -a $exit_code -eq 0
exit_code=$?
echo
echo "Running flake8..."
pflake8 .
test $? -eq 0 -a $exit_code -eq 0
exit_code=$?
echo
echo "Running bandit..."
bandit -c pyproject.toml -r $BANDIT_MODULES
test $? -eq 0 -a $exit_code -eq 0
exit_code=$?
echo
popd 2>&1 >/dev/null
exit $exit_code