V8.03.512.2025.06.06
All checks were successful
🔁 Render Graphviz Diagrams. / 🔁 Render Graphviz Diagrams. (push) Successful in 23s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m7s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-06-06 17:45:58 +02:00
parent 2ed84cac89
commit 1a5ae42516
4 changed files with 13 additions and 11 deletions

View File

@@ -126,12 +126,14 @@ jobs:
# STEP 1: Find target files.
#
# We capture:
# - All files '*.sh', '*.zsh', '*.chroot'
# - All files whose first line begins with #! (shebang)
# - All files '*.sh', '*.zsh', '*.chroot', '*.yaml', '*.yml'
# - All files whose first line begins with "#!" (shebang)
# -------------------------------
mapfile -t files_to_check < <(
find . -type f \( \
-iname '*.sh' -o \
-iname '*.yml' -o \
-iname '*.yaml' -o \
-iname '*.zsh' -o \
-iname '*.chroot' -o \
-exec grep -Iq '^#!' {} \; \
@@ -170,7 +172,7 @@ jobs:
for file in "${files_to_check[@]}"; do
#
# 4.1: CRLF detection
# grep -nP returns lineno:<line with CR>
# grep -nP returns "lineno:<line with CR>"
# -------------------------------
while IFS=: read -r lineno _rest; do
findings+="${file}: CRLF-found at line ${lineno}: <CR>"$'\n'
@@ -178,7 +180,7 @@ jobs:
#
# 4.2: Unallowed control characters
# grep -nP -o returns lineno:<matched-char>
# grep -nP -o returns "lineno:<matched-char>"
# -------------------------------
while IFS=: read -r lineno char; do
findings+="${file}: control-char at line ${lineno}: ${char}"$'\n'
@@ -186,7 +188,7 @@ jobs:
#
# 4.3: Non-ASCII characters with emoji exception
# grep -nP -o returns lineno:<matched-char>
# grep -nP -o returns "lineno:<matched-char>"
# -------------------------------
while IFS=: read -r lineno char; do
findings+="${file}: non-ascii at line ${lineno}: ${char}"$'\n'