mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
b7ddece2a6
Run `isort`, `flake8` and `black` over the `contrib/` directory and `synctl` script. The latter was already being done in CI, but now the linting script does it too. Fixes https://github.com/matrix-org/synapse/issues/7910
22 lines
402 B
Bash
Executable File
22 lines
402 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Runs linting scripts over the local Synapse checkout
|
|
# isort - sorts import statements
|
|
# black - opinionated code formatter
|
|
# flake8 - lints and finds mistakes
|
|
|
|
set -e
|
|
|
|
if [ $# -ge 1 ]
|
|
then
|
|
files=$*
|
|
else
|
|
files="synapse tests scripts-dev scripts contrib synctl"
|
|
fi
|
|
|
|
echo "Linting these locations: $files"
|
|
isort $files
|
|
python3 -m black $files
|
|
./scripts-dev/config-lint.sh
|
|
flake8 $files
|