Quick lint script for changed files (#2941)
This commit is contained in:
parent
dfca2476bd
commit
0def842231
1 changed files with 18 additions and 1 deletions
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…
Add table
Add a link
Reference in a new issue