You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve shellcheck warnings in test and packaging scripts (#518)
* fix: resolve shellcheck warnings in test and packaging scripts
- Add missing shebang to doinst.sh (SC2148)
- Quote variables throughout to prevent word splitting/globbing (SC2086)
- Replace echo "\n" with printf for escape sequences (SC2028)
- Replace backticks with $() (SC2006)
- Replace expr with $(()) arithmetic (SC2003)
- Replace [ ! $(grep ...) ] with ! grep -q (SC2143)
- Replace ls | wc -l with find | wc -l (SC2012)
- Replace printf "---\n" with echo for plain separator lines (SC3045)
All scripts remain POSIX/dash compatible.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: resolve shellcheck warnings in test_btrfs_clone.sh
- Quote $(id -u) to prevent word splitting (SC2046)
- Replace [ -n "$(mount | grep ...)" ] with mount | grep -q (SC2143)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: resolve shellcheck warnings in COMMON and fix CI path
- Add shell directive to COMMON (SC2148)
- Quote variables, fix backticks/expr, fix -o in [ ] (SC2086/SC2006/SC2003/SC2166)
- Fix pattern expansion quoting in cmp_substr (SC2295)
- Quote basename argument (SC2086)
- Fix broken echo strings in error message
- Remove unused TESTS_DIR variable
- Add SC2034 disable comments for variables used by sourcing scripts
- Update SHELLCHECK_OPTS path to test/ so shellcheck can follow COMMON source
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: trigger shellcheck CI re-run
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: use SCRIPTDIR so shellcheck can find COMMON on CI
SHELLCHECK_OPTS used $GITHUB_WORKSPACE which GitHub Actions does not
expand in env: blocks. SCRIPTDIR is shellcheck's built-in token that
resolves to the directory of the script being checked, so shellcheck
can find COMMON alongside each test script without a hardcoded path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: revert find to ls in test_basic.sh, disable SC2012
The OpenSUSE Tumbleweed CI container does not have 'find' in PATH.
Revert to the original ls -A approach and suppress SC2012 since
filenames in the waste folder are controlled and the count is reliable.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments