#!/bin/sh

# To use this githook copy this file to .git/hooks (in repo root dir)
# The file permissions may need changing using ``chmod +x .git/hooks/pre-push``

echo Running ruff linter tests...
TEST_RESULTS=$(tox -e check-style)
RETURN_VALUE=$?
if [ $RETURN_VALUE != 0 ]; then
  echo "$TEST_RESULTS"
  echo "To auto format run: tox -e format"
  exit 1
fi
echo PASSED
exit 0
