From 8d017b7678d654da25bcb171f9c15cfaa7a3cf80 Mon Sep 17 00:00:00 2001 From: cdce8p <30130371+cdce8p@users.noreply.github.com> Date: Thu, 10 May 2018 12:47:04 +0200 Subject: [PATCH] script/lint: Ensure there are files to test with pylint (#14363) --- script/lint | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/lint b/script/lint index dc6884f4882..8ba14d8939e 100755 --- a/script/lint +++ b/script/lint @@ -8,7 +8,7 @@ echo '=================================================' echo '= FILES CHANGED =' echo '=================================================' if [ -z "$files" ] ; then - echo "No python file changed. Rather use: tox -e lint" + echo "No python file changed. Rather use: tox -e lint\n" exit fi printf "%s\n" $files @@ -19,5 +19,10 @@ flake8 --doctests $files echo "================" echo "LINT with pylint" echo "================" -pylint $(echo "$files" | grep -v '^tests.*') +pylint_files=$(echo "$files" | grep -v '^tests.*') +if [ -z "$pylint_files" ] ; then + echo "Only test files changed. Skipping\n" + exit +fi +pylint $pylint_files echo