ldaptool/lints.sh

31 lines
516 B
Bash
Raw Normal View History

2023-04-28 02:45:32 +02:00
#!/bin/bash
set -e
cd "$(dirname "$(readlink "$0")")"
sources=($@)
if [ "${#sources[@]}" -eq 0 ]; then
sources=(src)
fi
rc=0
run() {
# remember last failure
if "$@"; then :; else rc=$?; fi
}
echo "[pycodestyle]"
run pycodestyle --config=.pycodestyle "${sources[@]}"
echo "[pyflakes]"
run python3 -m pyflakes "${sources[@]}"
echo "[mypy]"
run mypy "${sources[@]}"
echo "[black]"
run python3 -m black --check "${sources[@]}"
echo "[isort]"
run python3 -m isort --check-only "${sources[@]}"
exit $rc