2019-07-10 15:03:18 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Runs linting scripts over the local Synapse checkout
|
|
|
|
# isort - sorts import statements
|
|
|
|
# flake8 - lints and finds mistakes
|
|
|
|
# black - opinionated code formatter
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-11-01 11:52:20 +01:00
|
|
|
if [ $# -ge 1 ]
|
|
|
|
then
|
|
|
|
files=$*
|
|
|
|
else
|
|
|
|
files="synapse tests scripts-dev scripts"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Linting these locations: $files"
|
|
|
|
isort -y -rc $files
|
|
|
|
flake8 $files
|
|
|
|
python3 -m black $files
|
2019-10-23 14:22:54 +02:00
|
|
|
./scripts-dev/config-lint.sh
|