2020-08-10 00:02:07 +02:00
|
|
|
#!/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
|
2021-01-11 03:55:40 +01:00
|
|
|
files="my_project_name my-project-name tests"
|
2020-08-10 00:02:07 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Linting these locations: $files"
|
|
|
|
isort $files
|
|
|
|
flake8 $files
|
|
|
|
python3 -m black $files
|