Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check. Add a note to HACKING.rst
Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
diff --git a/exercises/neutron-adv-test.sh b/exercises/neutron-adv-test.sh
index a9199e6..0a24fe9 100755
--- a/exercises/neutron-adv-test.sh
+++ b/exercises/neutron-adv-test.sh
@@ -20,7 +20,7 @@
set -o errtrace
trap failed ERR
-failed() {
+function failed {
local r=$?
set +o errtrace
set +o xtrace
@@ -395,7 +395,7 @@
# Usage and main
# --------------
-usage() {
+function usage {
echo "$0: [-h]"
echo " -h, --help Display help message"
echo " -t, --tenant Create tenants"
@@ -408,7 +408,7 @@
echo " -T, --test Test functions"
}
-main() {
+function main {
echo Description