#!/bin/bash

set -o errexit
set -o pipefail
set -o nounset

BASE_DIR=$( realpath $( dirname "${BASH_SOURCE[0]}" )/../ )

pushd "$BASE_DIR" 2>&1 >/dev/null

echo "Running isort..."
isort -c .
echo

echo "Running black..."
black --check .
echo

echo "Running flake8..."
pflake8 .
echo

echo "Running mypy..."
mypy .
echo

echo "Running bandit..."
bandit -c .bandit.yml -r conftest.py sxm/
echo

echo "Running pylint..."
pylint sxm tests conftest.py
echo

popd 2>&1 >/dev/null
