core/script/lint

23 lines
349 B
Plaintext
Raw Normal View History

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