From befd58f47bab1b8337032d27a995e08c7dd93a83 Mon Sep 17 00:00:00 2001 From: Neil Pilgrim Date: Fri, 1 Nov 2019 03:52:20 -0700 Subject: Document lint.sh & allow application to specified files only (#6312) --- scripts-dev/lint.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'scripts-dev/lint.sh') 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 -- cgit 1.4.1