Replace phpcs exceptions with phpcs disable comments wrapped around i…#2882
Conversation
📝 WalkthroughWalkthroughThis PR primarily adds PHP_CodeSniffer indentation suppression/restore comments around many HTML/PHP output blocks and adjusts phpcs.xml ScopeIndent excludes. One controller (FrmFormsController::insert_form_popup) conditionally initializes and renders the WP editor when needed. Changes
Sequence Diagram(s)(Skipped — changes are largely PHPCS directive additions and small conditional editor initialization not warranting a sequence diagram.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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
🤖 Fix all issues with AI agents
In `@phpcs.xml`:
- Around line 241-256: The global phpcs ScopeIndent excludes list contains
redundant entries and missing inline suppressions: add targeted inline disables
(phpcs:disable Generic.WhiteSpace.ScopeIndent ... phpcs:enable) in the five
files that currently lack them—classes/models/FrmFieldTextarea.php,
classes/models/FrmEntryMeta.php, classes/controllers/FrmFieldsController.php,
classes/models/FrmPluginSearch.php, and
stripe/helpers/FrmTransLiteListHelper.php—and then remove the now-redundant
<exclude-pattern> entries for the seven files that already include inline
suppressions (classes/helpers/FrmStylesCardHelper.php,
classes/helpers/FrmFormsListHelper.php,
stripe/helpers/FrmTransLiteAppHelper.php, classes/helpers/FrmStylesHelper.php,
classes/models/FrmSolution.php, classes/controllers/FrmFormsController.php,
classes/helpers/FrmFormsHelper.php) from phpcs.xml so the project relies on
file-local suppressions only.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@classes/helpers/FrmAppHelper.php`:
- Around line 855-857: The phpcs suppression comment above the $_REQUEST access
is duplicated ("phpcs:ignore phpcs:ignore ...") so the sniff suppression may not
work; edit the comment in the FrmAppHelper code block that contains the
isset($_REQUEST[$args['param']]) check and the $value = wp_unslash(...) line to
use a single phpcs:ignore token—e.g. change it to "// phpcs:ignore
WordPress.Security.NonceVerification.Missing,
WordPress.Security.ValidatedSanitizedInput.InputNotSanitized" (or use a single
appropriate phpcs directive) so the intended sniffs are properly suppressed.
…h_phpcs_disable_comments Replace phpcs exceptions with phpcs disable comments wrapped around i…
…nline HTML
This way we're not ignoring indentation issues in some of these large files.
Summary by CodeRabbit
Style
Chores
New Features
✏️ Tip: You can customize this high-level summary in your review settings.