matrix-alertbot/scripts-dev/lint.sh
2022-06-13 20:55:01 +02:00

20 lines
360 B
Bash
Executable file

#!/bin/sh
#
# Runs linting scripts over the local checkout
# isort - sorts import statements
# flake8 - lints and finds mistakes
# black - opinionated code formatter
set -e
if [ $# -ge 1 ]
then
files=$*
else
files="matrix_alertbot matrix-alertbot tests"
fi
echo "Linting these locations: $files"
isort $files
flake8 $files
python3 -m black $files