Fix several bashate issues

* E001: Trailing Whitespace
* E003: Indent not multiple of 4
* E010: Do not on same line as for
* E011: Then keyword is not on same line as if keyword
* E020: Function declaration not in format
        "^function name {$": 'function check_file() {'

Change-Id: I73724bd2dfb9c908900919ce7b769c410a06eb1d
This commit is contained in:
Christian Berendt 2014-07-30 13:25:54 +02:00
parent 9048486908
commit 0c736d8069
3 changed files with 18 additions and 21 deletions

View File

@ -45,18 +45,18 @@ function run_tests {
echo 'Running tests'
if [ $debug -eq 1 ]; then
echo "Debugging..."
if [ "$args" = "" ]; then
# Default to running all tests if specific test is not
# provided.
testrargs="discover ./monascaclient/tests"
fi
${wrapper} python -m testtools.run $args $testrargs
echo "Debugging..."
if [ "$args" = "" ]; then
# Default to running all tests if specific test is not
# provided.
testrargs="discover ./monascaclient/tests"
fi
${wrapper} python -m testtools.run $args $testrargs
# Short circuit because all of the testr and coverage stuff
# below does not make sense when running testtools.run for
# debugging purposes.
return $?
# Short circuit because all of the testr and coverage stuff
# below does not make sense when running testtools.run for
# debugging purposes.
return $?
fi
# Just run the test suites in current environment
@ -82,8 +82,7 @@ else
done
fi
if [ "$no_venv" == 0 ]
then
if [ "$no_venv" == 0 ]; then
# Remove the virtual environment if --force used
if [ "$force" == 1 ]; then
echo "Cleaning virtualenv..."

View File

@ -7,7 +7,7 @@
# well. We should probably sort those on the egg-name, rather than the
# full line.
function check_file() {
function check_file {
typeset f=$1
# We don't care about comment lines.
@ -20,11 +20,9 @@ function check_file() {
}
exit_code=0
for filename in $@
do
for filename in $@; do
check_file $filename
if [ $? -ne 0 ]
then
if [ $? -ne 0 ]; then
echo "Please list requirements in $filename in alphabetical order" 1>&2
exit_code=1
fi

View File

@ -2,9 +2,9 @@
command -v tox > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo 'This script requires "tox" to run.'
echo 'You can install it with "pip install tox".'
exit 1;
echo 'This script requires "tox" to run.'
echo 'You can install it with "pip install tox".'
exit 1;
fi
tox -evenv -- $@