mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
script/lint: Ensure there are files to test with pylint (#14363)
This commit is contained in:
parent
5ec7fc7ddb
commit
8d017b7678
@ -8,7 +8,7 @@ echo '================================================='
|
|||||||
echo '= FILES CHANGED ='
|
echo '= FILES CHANGED ='
|
||||||
echo '================================================='
|
echo '================================================='
|
||||||
if [ -z "$files" ] ; then
|
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
|
exit
|
||||||
fi
|
fi
|
||||||
printf "%s\n" $files
|
printf "%s\n" $files
|
||||||
@ -19,5 +19,10 @@ flake8 --doctests $files
|
|||||||
echo "================"
|
echo "================"
|
||||||
echo "LINT with pylint"
|
echo "LINT with pylint"
|
||||||
echo "================"
|
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
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user