Add a bashate tox environment and address errors
Add a bashate environment for checking shell code quality. Exclude bashate warnings: E006: Line too long: E010: The "do" should be on same line as for In my opinion the places that trip these do not impact code readability Change-Id: Iab0a34542c3938f127515291eca8f027f3accaa0
This commit is contained in:
parent
6b09d8a6dc
commit
d827e71b22
@ -10,6 +10,7 @@ testtools>=1.4.0 # MIT
|
||||
virtualenv>=13.1.0 # MIT
|
||||
setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0,>=16.0 # PSF/ZPL
|
||||
mock>=2.0.0 # BSD
|
||||
bashate>=0.5.1 # Apache-2.0
|
||||
|
||||
# this is required for the docs build jobs
|
||||
sphinx>=1.6.2 # BSD
|
||||
|
@ -33,8 +33,7 @@
|
||||
|
||||
versions="$*"
|
||||
|
||||
if [ -z "$versions" ]
|
||||
then
|
||||
if [ -z "$versions" ] ; then
|
||||
echo "ERROR: Usage: $0 <version>" 1>&2
|
||||
echo "Example: $0 2.7 3.3 3.4" 1>&2
|
||||
exit 1
|
||||
|
@ -14,13 +14,14 @@
|
||||
|
||||
# Note(tonyb): Expand HEAD into something that's hopefully more human
|
||||
# readable
|
||||
declare -a branches=($(git describe --always) origin/master
|
||||
origin/stable/pike
|
||||
origin/stable/ocata
|
||||
origin/stable/newton
|
||||
declare -a branches=(
|
||||
$(git describe --always) origin/master
|
||||
origin/stable/pike
|
||||
origin/stable/ocata
|
||||
origin/stable/newton
|
||||
)
|
||||
|
||||
function search() {
|
||||
function search {
|
||||
git grep -hEi "^${1}[=><!]" ${2} -- "${3}"
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
function get_from_git()
|
||||
{
|
||||
function get_from_git {
|
||||
ref=$1
|
||||
series=$2
|
||||
path=${3:-publish/constraints/upper}
|
||||
|
9
tox.ini
9
tox.ini
@ -42,6 +42,15 @@ commands = validate-projects {toxinidir}/projects.txt
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
|
||||
[testenv:bashate]
|
||||
whitelist_externals = bash
|
||||
# E006: Line too long:
|
||||
# E010: The "do" should be on same line as for
|
||||
commands = bash -c "find {toxinidir}/tools \
|
||||
-type f \
|
||||
-name \*.sh \
|
||||
-print0 | xargs -0 bashate -v -iE006,E010"
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user