Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CLHatch committed Feb 18, 2025
1 parent db01044 commit 4c15711
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .scripts/app_list_referenced.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app_list_referenced() {
local APPNAME_REGEX='^[A-Z][A-Z0-9]*(__[A-Z0-9]+)?'
local REFERENCED_APPS_REGEX="${APPNAME_REGEX}(?=__[A-Za-z0-9]\w*\s*=)"

grep --color=never -o -P "${REFERENCED_APPS_REGEX}" "${COMPOSE_ENV}" | sort -u || true
grep --color=never -o -P "${REFERENCED_APPS_REGEX}" "${COMPOSE_ENV}" | sort -u || true
}

test_app_list_referenced() {
Expand Down
8 changes: 4 additions & 4 deletions .scripts/env_format_lines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env_format_lines() {
local ENV_DEFAULT_FILE=${2-}
local APPNAME=${3-}
APPNAME=${APPNAME^^}
local appname=${APPNAME,,}
#local appname=${APPNAME,,}

local TOP_SECTION='false'
#notice "["
Expand Down Expand Up @@ -51,7 +51,7 @@ env_format_lines() {
FORMATTED_ENV_VAR_INDEX[$VAR]=$index
done

if [[ -n ${CURRENT_ENV_LINES[@]-} ]]; then
if [[ -n ${CURRENT_ENV_LINES[*]} ]]; then
# Update the default variables
for index in "${!CURRENT_ENV_LINES[@]}"; do
local line=${CURRENT_ENV_LINES[index]}
Expand All @@ -60,12 +60,12 @@ env_format_lines() {
if [[ -n ${FORMATTED_ENV_VAR_INDEX["$VAR"]-} ]]; then
# Variable already exists, update its value
VAR_INDEX=${FORMATTED_ENV_VAR_INDEX["$VAR"]-}
FORMATTED_ENV_LINES[$VAR_INDEX]=$line
FORMATTED_ENV_LINES[VAR_INDEX]=$line
unset 'CURRENT_ENV_LINES[index]'
fi
done
CURRENT_ENV_LINES=("${CURRENT_ENV_LINES[@]-}")
if [[ -n ${CURRENT_ENV_LINES[@]-} ]]; then
if [[ -n ${CURRENT_ENV_LINES[*]} ]]; then
if [[ ${TOP_SECTION} == true ]]; then
# Add a blank if there was a previous section
FORMATTED_ENV_LINES+=("")
Expand Down
2 changes: 1 addition & 1 deletion .scripts/env_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env_update() {
run_script 'appvars_lines' "" > "${ENV_LINES_FILE}"

local -a UPDATED_ENV_LINES=()
readarray -t UPDATED_ENV_LINES < <( \
readarray -t UPDATED_ENV_LINES < <(
run_script 'env_format_lines' "${ENV_LINES_FILE}" "${COMPOSE_ENV_DEFAULT_FILE}" ""
)

Expand Down

0 comments on commit 4c15711

Please sign in to comment.