fix(ci): support runner ShellCheck diagnostics for indirect calls

Ubuntu 24.04 ships ShellCheck 0.9.0, which reports SC2317 for the EXIT cleanup and dynamically loaded installer test stubs. Scope both old and new diagnostic annotations to those indirect functions and regenerate both standalone scripts. Verified all shell checks and rootless regressions on the runner version as well as ShellCheck 0.11.0.
This commit is contained in:
Hamed Sanaei
2026-10-27 10:32:47 +03:30
parent 825f3c77a5
commit 51997927f2
4 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -301,7 +301,8 @@ ip_ssl_issue_and_install() (
umask 077
mkdir -p "$cert_dir" || return 1
stage=$(mktemp -d "$cert_dir/.xui-install.XXXXXX") || return 1
# shellcheck disable=SC2329
# Invoked indirectly by the EXIT trap; older ShellCheck reports SC2317.
# shellcheck disable=SC2317,SC2329
ip_ssl_install_cleanup() {
restored=1
if ((attempted && !installed)); then
+2 -1
View File
@@ -244,7 +244,8 @@ ip_ssl_issue_and_install() (
umask 077
mkdir -p "$cert_dir" || return 1
stage=$(mktemp -d "$cert_dir/.xui-install.XXXXXX") || return 1
# shellcheck disable=SC2329
# Invoked indirectly by the EXIT trap; older ShellCheck reports SC2317.
# shellcheck disable=SC2317,SC2329
ip_ssl_install_cleanup() {
restored=1
if ((attempted && !installed)); then
+2 -2
View File
@@ -12,9 +12,9 @@ source /dev/stdin < <(awk '/^# BEGIN GENERATED IP SSL HELPERS/ {block=1;next} /^
source_function "$ROOT/install.sh" prompt_or_default
source_function "$ROOT/install.sh" prompt_and_setup_ssl
# Invoked by the real installer function loaded above, before the failure stubs.
# shellcheck disable=SC2329
# shellcheck disable=SC2317,SC2329
setup_ip_certificate() { captured="${2:-}"; called=1; }
# shellcheck disable=SC2329
# shellcheck disable=SC2317,SC2329
systemctl() { stopped=1; }
export NONINTERACTIVE=1 XUI_SSL_MODE=ip XUI_SSL_IPV6='not:ipv6'
called=0; stopped=0
+2 -1
View File
@@ -287,7 +287,8 @@ ip_ssl_issue_and_install() (
umask 077
mkdir -p "$cert_dir" || return 1
stage=$(mktemp -d "$cert_dir/.xui-install.XXXXXX") || return 1
# shellcheck disable=SC2329
# Invoked indirectly by the EXIT trap; older ShellCheck reports SC2317.
# shellcheck disable=SC2317,SC2329
ip_ssl_install_cleanup() {
restored=1
if ((attempted && !installed)); then