hass-core/script/lint

23 lines
349 B
Text
Raw Normal View History

# 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
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
else
exit $FLAKE8_STATUS
2015-09-19 12:29:23 -07:00
fi