Add bashate checks to pep8 step
Similarly to pep8 checks, this allows enforcing a consistent style of the shell scripts accross modfications. For now only the indentation is enforced to reduce code churn. Closes-Bug: 1648099 Change-Id: Ie66cbe1aea4bd01a8bba8833ef6cbd2cff6a7c6a
This commit is contained in:
parent
73c5f6ea4f
commit
80fc5a2d42
6
cover.sh
6
cover.sh
@ -53,10 +53,8 @@ echo "Allowed to introduce missing lines : ${ALLOWED_EXTRA_MISSING}"
|
||||
echo "Missing lines in master : ${baseline_missing}"
|
||||
echo "Missing lines in proposed change : ${current_missing}"
|
||||
|
||||
if [ $allowed_missing -ge $current_missing ];
|
||||
then
|
||||
if [ $baseline_missing -lt $current_missing ];
|
||||
then
|
||||
if [ $allowed_missing -ge $current_missing ]; then
|
||||
if [ $baseline_missing -lt $current_missing ]; then
|
||||
show_diff $baseline_report $current_report
|
||||
echo "We believe you can test your code with 100% coverage!"
|
||||
else
|
||||
|
@ -33,8 +33,7 @@ fi
|
||||
$configure_docker_storage_driver
|
||||
|
||||
if [ "$DOCKER_STORAGE_DRIVER" = "overlay" ]; then
|
||||
if [ $(echo -e "$(uname -r)\n3.18" | sort -V | head -1) \
|
||||
= $(uname -r) ]; then
|
||||
if [ $(echo -e "$(uname -r)\n3.18" | sort -V | head -1) = $(uname -r) ]; then
|
||||
ERROR_MESSAGE="OverlayFS requires at least Linux kernel 3.18. Cluster node kernel version: $(uname -r)"
|
||||
echo "ERROR: ${ERROR_MESSAGE}" >&2
|
||||
sh -c "${WAIT_CURL} --data-binary '{\"status\": \"FAILURE\", \"reason\": \"${ERROR_MESSAGE}\"}'"
|
||||
|
@ -6,6 +6,7 @@
|
||||
# ascii betical order.
|
||||
|
||||
bandit>=1.1.0 # Apache-2.0
|
||||
bashate>=0.2 # Apache-2.0
|
||||
coverage>=4.0 # Apache-2.0
|
||||
doc8 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
|
7
tox.ini
7
tox.ini
@ -98,6 +98,13 @@ commands =
|
||||
doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
|
||||
bash tools/flake8wrap.sh {posargs}
|
||||
bandit -r magnum -x tests -n5 -ll
|
||||
bash -c "find {toxinidir} \
|
||||
-not \( -type d -name .?\* -prune \) \
|
||||
-not \( -type d -name doc -prune \) \
|
||||
-not \( -type d -name contrib -prune \) \
|
||||
-type f \
|
||||
-name \*.sh \
|
||||
-print0 | xargs -0 bashate -v -iE006,E010,E042 -eE005"
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
Loading…
Reference in New Issue
Block a user