tests: run mvdan/shfmt on test runs
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™. The command used to reprocess everything is: ```shell shfmt -l -bn -ci -i 2 -w . ```
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-domains-report() {
|
||||
declare desc="displays a domains report for one or more apps"
|
||||
@@ -47,7 +48,8 @@ cmd-domains-report-single() {
|
||||
dokku_log_verbose "$(printf "%-30s %-25s" "${key^}" "${flag#*: }")"
|
||||
done
|
||||
else
|
||||
local match=false; local value_exists=false
|
||||
local match=false
|
||||
local value_exists=false
|
||||
for flag in "${flag_map[@]}"; do
|
||||
valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)"
|
||||
if [[ "$flag" == "${INFO_FLAG}:"* ]]; then
|
||||
@@ -65,9 +67,9 @@ cmd-domains-report-single() {
|
||||
fi
|
||||
}
|
||||
|
||||
domains_help_content_func () {
|
||||
declare desc="return domains plugin help content"
|
||||
cat<<help_content
|
||||
domains_help_content_func() {
|
||||
declare desc="return domains plugin help content"
|
||||
cat <<help_content
|
||||
domains [<app>], [DEPRECATED] Alternative for domains:report
|
||||
domains:add <app> <domain> [<domain> ...], Add domains to app
|
||||
domains:add-global <domain> [<domain> ...], Add global domain names
|
||||
@@ -83,7 +85,7 @@ help_content
|
||||
}
|
||||
|
||||
domains_help_cmd() {
|
||||
if [[ $1 = "domains:help" ]] ; then
|
||||
if [[ $1 == "domains:help" ]]; then
|
||||
echo -e 'Usage: dokku domains[:COMMAND]'
|
||||
echo ''
|
||||
echo 'Manage vhost domains used by the Dokku proxy.'
|
||||
@@ -93,7 +95,7 @@ domains_help_cmd() {
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
domains_help_content_func
|
||||
else
|
||||
cat<<help_desc
|
||||
cat <<help_desc
|
||||
domains, Manage vhost domains used by the Dokku proxy
|
||||
help_desc
|
||||
fi
|
||||
@@ -112,7 +114,7 @@ fn-domains-app-vhosts() {
|
||||
declare APP="$1"
|
||||
local APP_VHOST_FILE="$DOKKU_ROOT/$APP/VHOST"
|
||||
if [[ -f "$APP_VHOST_FILE" ]]; then
|
||||
tr '\n' ' ' < "$APP_VHOST_FILE"
|
||||
tr '\n' ' ' <"$APP_VHOST_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user