Skip to content

Commit f2bf419

Browse files
CopilotPDowney
andauthored
vhost-import: add explicit return statements to satisfy SonarCloud warnings
Agent-Logs-Url: https://github.com/EngineScript/EngineScript/sessions/4e797a46-9887-4f1f-bcaf-187ebe5e3ff7 Co-authored-by: PDowney <[email protected]>
1 parent 705d7df commit f2bf419

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to EngineScript will be documented in this file.
44

55
Changes are organized by date, with the most recent changes listed first.
66

7+
## 2026-04-11
8+
9+
### 🔧 VHOST IMPORT SONARCLOUD WARNING FIXES
10+
11+
- Added explicit `return 0` at the end of `build_default_url_validation_regex()` in `scripts/functions/vhost/vhost-import.sh` to satisfy SonarCloud explicit-return rule.
12+
- Added explicit `return $?` at the end of `is_directory_absent_or_empty()` in `scripts/functions/vhost/vhost-import.sh` to satisfy SonarCloud explicit-return rule.
13+
- Added explicit `return 0` at the end of `escape_ere_literal_for_sed()` in `scripts/functions/vhost/vhost-import.sh` to satisfy SonarCloud explicit-return rule.
14+
715
## 2026-04-10 (2)
816

917
### 🔒 VHOST IMPORT SECURITY AND MAINTAINABILITY IMPROVEMENTS

scripts/functions/vhost/vhost-import.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ build_default_url_validation_regex() {
4444
local suffix='([/?#].*)?'
4545

4646
echo "^${scheme}${host}${port}${suffix}$"
47+
return 0
4748
}
4849

4950
readonly DEFAULT_URL_VALIDATION_REGEX="$(build_default_url_validation_regex)"
@@ -69,6 +70,7 @@ validate_zip_archive_paths() {
6970
is_directory_absent_or_empty() {
7071
local dir="$1"
7172
[[ ! -d "$dir" ]] || [[ -z "$(find "$dir" -mindepth 1 -print -quit)" ]]
73+
return $?
7274
}
7375

7476
# --- Instructions for Preparing Files ---
@@ -132,6 +134,7 @@ sleep 1
132134
escape_ere_literal_for_sed() {
133135
local raw="$1"
134136
printf '%s' "$raw" | sed -E 's#[][(){}.^$*+?|\\/-]#\\&#g'
137+
return 0
135138
}
136139

137140
# Function to extract define values (Handles single/double quotes)

0 commit comments

Comments
 (0)