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