From 0def8422314d206e7497749e0adcf5c51faf0e2a Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Tue, 23 Aug 2016 05:52:31 +0200 Subject: [PATCH] Quick lint script for changed files (#2941) --- script/lint | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/script/lint b/script/lint index 4a517ef7494..ea8d84e7b84 100755 --- a/script/lint +++ b/script/lint @@ -3,4 +3,21 @@ # NOTE: all testing is now driven through tox. The tox command below # performs roughly what this test did in the past. -tox -e lint +if [ "$1" == "--changed" ]; then + export files=`git diff upstream/dev --name-only | grep -v requirements_all.txt` + echo "=================================================" + echo "FILES CHANGED (git diff upstream/dev --name-only)" + echo "=================================================" + echo $files + echo "================" + echo "LINT with flake8" + echo "================" + flake8 --doctests $files + echo "================" + echo "LINT with pylint" + echo "================" + pylint $files + echo +else + tox -e lint +fi