mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Quick lint script for changed files (#2941)
This commit is contained in:
parent
dfca2476bd
commit
0def842231
19
script/lint
19
script/lint
@ -3,4 +3,21 @@
|
|||||||
# NOTE: all testing is now driven through tox. The tox command below
|
# NOTE: all testing is now driven through tox. The tox command below
|
||||||
# performs roughly what this test did in the past.
|
# performs roughly what this test did in the past.
|
||||||
|
|
||||||
tox -e lint
|
if [ "$1" == "--changed" ]; then
|
||||||
|
export files=`git diff upstream/dev --name-only | grep -v requirements_all.txt`
|
||||||
|
echo "================================================="
|
||||||
|
echo "FILES CHANGED (git diff upstream/dev --name-only)"
|
||||||
|
echo "================================================="
|
||||||
|
echo $files
|
||||||
|
echo "================"
|
||||||
|
echo "LINT with flake8"
|
||||||
|
echo "================"
|
||||||
|
flake8 --doctests $files
|
||||||
|
echo "================"
|
||||||
|
echo "LINT with pylint"
|
||||||
|
echo "================"
|
||||||
|
pylint $files
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
tox -e lint
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user