V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m15s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-05 13:12:31 +01:00
parent 0414737759
commit b7f1f0a4dd
12 changed files with 171 additions and 44 deletions

View File

@@ -39,4 +39,7 @@ guard_sourcing() {
declare -grx "${var_guard_var}"=1
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f guard_sourcing
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -25,4 +25,7 @@ source_guard() {
. "${var_file}"
fi
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f source_guard
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -25,4 +25,7 @@ safe_exec() {
do_log "error" "file_only" "0007() Command '${ary_cmd[*]}' failed."
return "${var_errcode}"
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f safe_exec
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -32,6 +32,9 @@ ensure_lowercase() {
ref="${ref,,}"
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f ensure_lowercase
#######################################
# Converts the value of a passed variable to uppercase.
@@ -53,6 +56,9 @@ ensure_uppercase() {
ref="${ref^^}"
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f ensure_uppercase
#######################################
# Removes leading and trailing spaces in the value.
@@ -75,6 +81,9 @@ ensure_trimmed() {
ref="${ref%"${ref##*[![:space:]]}"}"
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f ensure_trimmed
#######################################
# Resets the value of the variable to a default value if it is empty or contains only whitespace.
@@ -102,6 +111,9 @@ reset_to_default() {
fi
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f reset_to_default
#######################################
# Checks whether the content of a variable matches a specific regex.
@@ -129,4 +141,7 @@ assert_match() {
fi
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f assert_match
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -23,4 +23,7 @@ guard_dir() {
cd "${VAR_SETUP_PATH}"
do_log "info" "file_only" "${mod} Finished successfully."
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f guard_dir
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh