2015-09-17 00:35:26 -07:00
|
|
|
# Run style checks
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
echo "Checking style with flake8..."
|
2015-12-27 16:30:32 -08:00
|
|
|
tput setaf 1
|
2015-09-19 12:29:23 -07:00
|
|
|
flake8 --exclude www_static homeassistant
|
2015-09-20 11:00:35 -07:00
|
|
|
FLAKE8_STATUS=$?
|
2015-12-27 19:18:03 -08:00
|
|
|
tput sgr0
|
2015-09-17 00:35:26 -07:00
|
|
|
|
|
|
|
echo "Checking style with pylint..."
|
2015-12-27 16:30:32 -08:00
|
|
|
tput setaf 1
|
2015-12-27 18:03:23 -08:00
|
|
|
pylint homeassistant
|
2015-09-20 11:00:35 -07:00
|
|
|
PYLINT_STATUS=$?
|
2015-12-27 19:18:03 -08:00
|
|
|
tput sgr0
|
2015-09-19 12:29:23 -07:00
|
|
|
|
2015-09-20 11:00:35 -07:00
|
|
|
if [ $FLAKE8_STATUS -eq 0 ]
|
2015-09-19 12:29:23 -07:00
|
|
|
then
|
2015-09-20 11:00:35 -07:00
|
|
|
exit $PYLINT_STATUS
|
2015-09-20 19:56:10 -07:00
|
|
|
else
|
|
|
|
exit $FLAKE8_STATUS
|
2015-09-19 12:29:23 -07:00
|
|
|
fi
|