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:
Jose Diaz-Gonzalez
2019-01-07 01:04:17 -05:00
parent fb7c73a7e3
commit 86795ddacc
283 changed files with 1536 additions and 1018 deletions

View File

@@ -1,7 +1,8 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
cmd-git-report() {
declare desc="displays a git report for one or more apps"
@@ -46,7 +47,8 @@ cmd-git-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
@@ -66,7 +68,7 @@ cmd-git-report-single() {
git_help_content_func() {
declare desc="return git plugin help content"
cat<<help_content
cat <<help_content
git:initialize <app>, Initialize a git repository for an app
git:report [<app>] [<flag>], Displays a git report for one or more apps
git:set <app> <property> (<value>), Set or clear a git property for an app
@@ -74,7 +76,7 @@ help_content
}
cmd-git-help() {
if [[ $1 = "git:help" ]] ; then
if [[ $1 == "git:help" ]]; then
echo -e 'Usage: dokku git[:COMMAND]'
echo ''
echo 'Manages the git integration for an app.'
@@ -85,7 +87,7 @@ cmd-git-help() {
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
git_help_content_func
else
cat<<help_desc
cat <<help_desc
git, Manages the git integration for an app
help_desc
fi