Compare commits

..

1 commit

Author SHA1 Message Date
ZoopaMario 166a947497 Refactor code to make linter runs succeed
All checks were successful
Check Commit Messages / check-commit-message (pull_request) Successful in 15s
Lint Bash Scripts / lint-bash (pull_request) Successful in 25s
This commit refactors the codebase in order to make the shellcheck
workflow pass.
2024-12-29 15:45:27 +01:00

View file

@ -23,7 +23,7 @@ jobs:
- name: Install ShellCheck - name: Install ShellCheck
run: | run: |
apt-get update && apt-get install -y shellcheck apt-get update && apt-get install -y shellcheck
- name: Find Shell Scripts - name: Find Shell Scripts
id: find-scripts id: find-scripts
run: | run: |
@ -31,9 +31,10 @@ jobs:
find . -name '*.sh' -print0 > shell-scripts.list find . -name '*.sh' -print0 > shell-scripts.list
- name: Run ShellCheck in Script Directories - name: Run ShellCheck in Script Directories
shell: bash
run: | run: |
echo "Running ShellCheck in each script's directory..." echo "Running ShellCheck in each script's directory..."
while IFS= read -r -d '' script; do while IFS= read -r script; do
echo "Checking $script" echo "Checking $script"
script_dir=$(dirname "$script") script_dir=$(dirname "$script")
script_name=$(basename "$script") script_name=$(basename "$script")
@ -41,4 +42,3 @@ jobs:
(cd "$script_dir" && shellcheck -x "$script_name") (cd "$script_dir" && shellcheck -x "$script_name")
done < shell-scripts.list done < shell-scripts.list