Skip to content

Commit

Permalink
script/lint: Ensure there are files to test with pylint (#14363)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored and kellerza committed May 10, 2018
1 parent 5ec7fc7 commit 8d017b7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions script/lint
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 8d017b7

Please sign in to comment.