From 6beb88048605b1c0b9d5efda0d9f60f167117e17 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 6 Feb 2018 11:54:12 +0000 Subject: [PATCH] Add bashate to pep8 tox environment --- test-requirements.txt | 1 + tools/run-bashate.sh | 7 +++++++ tox.ini | 1 + 3 files changed, 9 insertions(+) create mode 100755 tools/run-bashate.sh diff --git a/test-requirements.txt b/test-requirements.txt index 40ebf79e2..8b4242490 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,6 +4,7 @@ hacking>=0.12.0,<0.13 # Apache-2.0 +bashate>=0.2 # Apache-2.0 coverage>=4.0 # Apache-2.0 doc8 # Apache-2.0 sphinx>=1.5.1 # BSD diff --git a/tools/run-bashate.sh b/tools/run-bashate.sh new file mode 100755 index 000000000..897228c81 --- /dev/null +++ b/tools/run-bashate.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Ignore E006 -- line length greater than 80 char + +ROOT=$(readlink -fn $(dirname $0)/.. ) +find $ROOT -not -wholename \*.tox/\* -and -not -wholename \*.test/\* \ + -and -name \*.sh -print0 | xargs -0 bashate -v --ignore E006 diff --git a/tox.ini b/tox.ini index 6819d60d6..2c7ed96f7 100644 --- a/tox.ini +++ b/tox.ini @@ -19,6 +19,7 @@ commands = unit2 discover {posargs} [testenv:pep8] commands = + {toxinidir}/tools/run-bashate.sh flake8 {posargs} kayobe # Check the *.rst files # We use a thin wrapper around doc8 currently, which has support for sphinx