From 192ebcdb80d65067d7ea59330c99c269d056ab1d Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 15 Mar 2017 13:00:10 -0400 Subject: [PATCH] Introduce fast8 tox target The pep8 target has the little known "-HEAD" argument which makes it only run flake8 on the changes since the last change in the history. Even though that's nice, it's sometimes hard to remember the -HEAD argument. Plus pep8 is running some other checks on things like the docs. So if all you want is the pep8 -- -HEAD behavior, this is a simplied convenient form of it. Change-Id: I97b277d8ac95ca3ef8379570e0e3886df26263e1 --- tox.ini | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tox.ini b/tox.ini index f5b683f48..ade0eb889 100644 --- a/tox.ini +++ b/tox.ini @@ -44,6 +44,15 @@ commands = # Check that all included JSON files are valid JSON bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python' +[testenv:fast8] +# This is a subset of the full pep8 check which +# only runs flake8 on the changes made since +# HEAD-1. For a full flake8 run including checking +# docs, just use pep8. +basepython = python2.7 +commands = + bash tools/flake8wrap.sh -HEAD + [testenv:functional] # TODO(melwitt): This can be removed when functional tests are gating with # python 3.x