Addresses Gemini review feedback from PR #80 (build.sh:88): replaces the
redundant pair of printf+echo deployment messages with a single printf call,
which is more concise and idiomatic for formatted shell output.
Closes#97
- SC2155 (bin/localwp-setup.sh): declare local variables separately from
command substitution assignments to avoid masking return values (13 fixes)
- SC2034 (bin/localwp-setup.sh): remove unused PLUGIN_TEXT_DOMAIN variable
- SC2162 (bin/localwp-setup.sh): add -r flag to read to avoid backslash mangling
- SC2154 (bin/setup-test-env.sh): add shellcheck disable for PHP variables in
heredoc that ShellCheck incorrectly identifies as unassigned shell variables
- bin/setup-test-env.sh: remove self-modifying chmod +x $0 (unnecessary and
bad practice; file permissions should be set once in version control)
- bin/setup-test-env.sh: change == to = in POSIX [ ] test expressions
- build.sh: add ./ prefix to directory glob copies for clarity
- build.sh: use subshell (cd build || exit 1; zip ...) instead of bare cd/cd..
to avoid SC2103 and ensure working directory is always restored
Fixes part of #20 (shell script quality issues)
* fix: remove duplicate deployment echo in build.sh
Remove duplicate 'Deploying to local WordPress installation...' message.
Replace printf with echo "" for blank line separator to avoid \n
rendering issues without -e flag.
Closes#70
* fix: use ${WP_LOCAL_PLUGIN_DIR:-} for bash nounset safety in build.sh
Addresses CodeRabbit Major review feedback on PR #80.
Direct dereference of $WP_LOCAL_PLUGIN_DIR under set -u causes the script
to exit when the variable is unset, even though local deployment is optional.
Using ${WP_LOCAL_PLUGIN_DIR:-} safely handles the unset case without
triggering nounset.
* fix: address PR #10 CodeRabbit review feedback
- Fix SC2115 shellcheck warning in build.sh (use ${var:?} for safe rm -rf)
- Fix SC2164 shellcheck warning in build.sh (cd build || exit 1)
- Standardise bullet points from hyphens to asterisks in .wiki/Contributing.md
- Refine verb formality in readme.txt, README.md, .wiki/Contributing.md, .wiki/Coding-Standards.md
- Clarify PHPDoc wording in .wiki/Coding-Standards.md
- Add clarifying comment to phpcs-simple.xml arg value
* fix: re-enable PHPUnit test step in tests.yml
Tests were commented out in PR #10. PHPUnit test files exist in
tests/phpunit/ and phpunit.xml is configured. Re-enabling the step
so tests actually run in CI.
Closes#45
* fix: remove redundant composer require steps in code-quality workflow
szepeviktor/phpstan-wordpress, wp-coding-standards/wpcs, and
dealerdirect/phpcodesniffer-composer-installer are already declared in
composer.json require-dev. The extra 'composer require' steps after
'composer install' caused a second packagist.org network hit that timed
out in CI, failing the PHPStan Static Analysis job.
Fixes the Code Quality CI failure on PR #51 (issue #45).