#!/usr/bin/env bash

# This script is just here to run pylint checkers in a standard
# single-point-of-truth way. Feel free to run it manually instead.

# run from root of current project
cd "$(dirname "$(dirname "$(realpath "$0")")")" || exit 1

"dev/run-in-venv" pytest --doctest-modules --ignore-glob="test/*" "$@"

# pytest complains with warnings about non-existing tests or 3rd party stuff
# and will return 5 instead of 0. Here we ignore this.
if [[ $? == @("0"|"5") ]]; then
    exit 0
else
    exit 1
fi
