diff --git a/test/run b/test/run index 7715881eb4..bad9bafefa 100755 --- a/test/run +++ b/test/run @@ -1,17 +1,16 @@ #!/bin/sh - set -eu +PYEXEFILES="$(git grep -lI '^#!.*python') $(git ls-files "*.py")" + test_ruff() { command -v ruff >/dev/null || { echo 'no ruff installed'; return 0; } - test -n "$(ruff check --show-files .)" || return 0 # no python changes - ruff check --no-cache . + ruff check --no-cache . $PYEXEFILES } test_ruff # run static code checks like pyflakes and pep8 -PYEXEFILES="$(git grep -lI '^#!.*python') $(git ls-files "*.py")" flake8 $PYEXEFILES ./test-bots