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/lib/template b/lib/template
index b8e7c4d..efe5826 100644
--- a/lib/template
+++ b/lib/template
@@ -45,7 +45,7 @@
# cleanup_XXXX() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
-function cleanup_XXXX() {
+function cleanup_XXXX {
# kill instances (nova)
# delete image files (glance)
# This function intentionally left blank
@@ -53,7 +53,7 @@
}
# configure_XXXX() - Set config files, create data dirs, etc
-function configure_XXXX() {
+function configure_XXXX {
# sudo python setup.py deploy
# iniset $XXXX_CONF ...
# This function intentionally left blank
@@ -61,26 +61,26 @@
}
# init_XXXX() - Initialize databases, etc.
-function init_XXXX() {
+function init_XXXX {
# clean up from previous (possibly aborted) runs
# create required data files
:
}
# install_XXXX() - Collect source and prepare
-function install_XXXX() {
+function install_XXXX {
# git clone xxx
:
}
# start_XXXX() - Start running processes, including screen
-function start_XXXX() {
+function start_XXXX {
# screen_it XXXX "cd $XXXX_DIR && $XXXX_DIR/bin/XXXX-bin"
:
}
# stop_XXXX() - Stop running processes (non-screen)
-function stop_XXXX() {
+function stop_XXXX {
# FIXME(dtroyer): stop only our screen screen window?
:
}