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

View File

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

View File

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