Merge "Add fast8 to quickly test pep8 changes"
This commit is contained in:
commit
4d0965b1e4
15
tools/fast8.sh
Executable file
15
tools/fast8.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd $(dirname "$0")/..
|
||||
CHANGED=$(git diff --name-only HEAD~1 | tr '\n' ' ')
|
||||
|
||||
# Skip files that don't exist
|
||||
# (have been git rm'd)
|
||||
CHECK=""
|
||||
for FILE in $CHANGED; do
|
||||
if [ -f "$FILE" ]; then
|
||||
CHECK="$CHECK $FILE"
|
||||
fi
|
||||
done
|
||||
|
||||
diff -u --from-file /dev/null $CHECK | flake8 --diff
|
7
tox.ini
7
tox.ini
@ -22,7 +22,12 @@ whitelist_externals = bash
|
||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
commands = flake8 {posargs}
|
||||
|
||||
[testenv:fast8]
|
||||
envdir = {toxworkdir}/pep8
|
||||
commands =
|
||||
{toxinidir}/tools/fast8.sh
|
||||
|
||||
[testenv:pylint]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
|
Loading…
Reference in New Issue
Block a user