1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/usr/bin/env bash
# ensure consistent behaviour
src_dir="$(dirname "$(realpath "$0")")"
source $src_dir/utils/_env.sh
# stop failing early, because we wouldn't do anything else than fail
set +e
# check code using ruff
echo -e "${yellow}Linting using ruff...${reset}"
ruff check python/knot_resolver tests/pytests
check_rv $?
echo
# check types using mypy
echo -e "${yellow}Checking types using mypy...${reset}"
mypy python/knot_resolver
check_rv $?
echo
# fancy messages at the end :)
fancy_message
# exit with the aggregate return value
exit $aggregated_rv
|