Nidhogg/scripts-dev/lint.sh
2021-06-27 19:09:02 +01:00

21 lines
356 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="valheim_bot my-project-name tests"
fi
echo "Linting these locations: $files"
isort $files
flake8 $files
python3 -m black $files