mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +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
|
||||
# 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