summary refs log tree commit diff
path: root/scripts-dev/lint.sh
blob: 064799365832d0fecc27a7753a1d51e035395915 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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