summary refs log tree commit diff
path: root/scripts-dev
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-16 19:23:55 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-16 19:23:55 +0000
commit22f14ae26cec1cf301138c0296ad18d7f005afd2 (patch)
tree1cfce98a08534e61207a4df389dab0f2538d2b0e /scripts-dev
parentDepublish a room from the public rooms list when it is upgraded (#6232) (diff)
parentDocument lint.sh & allow application to specified files only (#6312) (diff)
downloadsynapse-22f14ae26cec1cf301138c0296ad18d7f005afd2.tar.xz
Document lint.sh & allow application to specified files only (#6312)
* commit 'befd58f47':
  Document lint.sh & allow application to specified files only (#6312)
Diffstat (limited to 'scripts-dev')
-rwxr-xr-xscripts-dev/lint.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts-dev/lint.sh b/scripts-dev/lint.sh
index 02a2ca39e5..34c4854e11 100755
--- a/scripts-dev/lint.sh
+++ b/scripts-dev/lint.sh
@@ -7,7 +7,15 @@
 
 set -e
 
-isort -y -rc synapse tests scripts-dev scripts
-flake8 synapse tests
-python3 -m black synapse tests scripts-dev scripts
+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
 ./scripts-dev/config-lint.sh