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/savanna-dashboard b/lib/savanna-dashboard
index 691b23f..6fe15a3 100644
--- a/lib/savanna-dashboard
+++ b/lib/savanna-dashboard
@@ -35,7 +35,7 @@
# Functions
# ---------
-function configure_savanna_dashboard() {
+function configure_savanna_dashboard {
echo -e "AUTO_ASSIGNMENT_ENABLED = False" >> $HORIZON_DIR/openstack_dashboard/local/local_settings.py
echo -e "HORIZON_CONFIG['dashboards'] += ('savanna',)" >> $HORIZON_DIR/openstack_dashboard/settings.py
@@ -47,19 +47,19 @@
}
# install_savanna_dashboard() - Collect source and prepare
-function install_savanna_dashboard() {
+function install_savanna_dashboard {
install_python_savannaclient
git_clone $SAVANNA_DASHBOARD_REPO $SAVANNA_DASHBOARD_DIR $SAVANNA_DASHBOARD_BRANCH
setup_develop $SAVANNA_DASHBOARD_DIR
}
-function install_python_savannaclient() {
+function install_python_savannaclient {
git_clone $SAVANNA_PYTHONCLIENT_REPO $SAVANNA_PYTHONCLIENT_DIR $SAVANNA_PYTHONCLIENT_BRANCH
setup_develop $SAVANNA_PYTHONCLIENT_DIR
}
# Cleanup file settings.py from Savanna
-function cleanup_savanna_dashboard() {
+function cleanup_savanna_dashboard {
sed -i '/savanna/d' $HORIZON_DIR/openstack_dashboard/settings.py
}