fix: include readme.txt and license.txt in zip, fix phpcs:disable scope - #49
Conversation
📝 WalkthroughWalkthroughTwo minor changes: the PHPCS suppression comment around ChangesAnnotation fix and packaging additions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/zip-plugin.js`:
- Around line 42-43: The readme.txt and license.txt file entries in the
packaging configuration do not have the required flag set, causing missing files
to only warn instead of failing the build. Add required: true property to both
the entry with src pointing to readme.txt and the entry with src pointing to
license.txt to ensure the zip packaging fails fast during CI/release if these
critical files are missing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7486cb46-e2f2-47f3-9b8e-c8e1dfb4861b
📒 Files selected for processing (2)
SLASHED-for-WP/includes/class-manual-css-page.phpscripts/zip-plugin.js
Summary
Two fixes from the second Plugin Check run:
readme.txtmissing from zip —scripts/zip-plugin.jsonly packed PHP files and asset directories;readme.txtandlicense.txtwere not in theINCLUDElist. Both are now included so the distributed zip is complete for WordPress.org.phpcs:ignoreonly suppressed line 65 (isset(...)), but the$_POSTaccess also appears on line 66 (the ternary branch). Switched tophpcs:disable/phpcs:enableto wrap the full two-line block.Test plan
npm run build:zipand confirmreadme.txtandlicense.txtare present insidedist/slashed.zipunderslashed/Generated by Claude Code
Summary by cubic
Include
readme.txtandlicense.txtin the plugin zip, mark them as required, and fix the PHPCS suppression scope to cover the full input read. This makes the zip WordPress.org-compliant and removes the lingering sanitization warning.readme.txtandlicense.txtto theINCLUDElist inscripts/zip-plugin.jsand marked themrequired: trueso they’re packaged inslashed/and the build fails if missing.phpcs:ignoreto scopedphpcs:disable/phpcs:enableinclass-manual-css-page.phpto cover both ternary lines that access$_POST.Written for commit 2286a2e. Summary will update on new commits.
Summary by CodeRabbit
Refactor
Documentation