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
Sometimes, a block of code will be flagged by WPCS with an error which you wish to ignore. An example of this could be a variable which is sanitised or escaped elsewhere before being used or output.
PHPCS lets you whitelist given errors for a line or block of code.
Example: // phpcs:ignore WordPress.Security.EscapeOutput.
Note that WPCS had native whitelist comments like below: // Input var okay.
or // WPCS: Input var okay.
These have been deprecated in WPCS 2.0.0 and will be removed in WPCS 3.0.0. The PHPCS format (// phpcs:ignore) is the preferred format.
I intend to submit a PR to replace the deprecated syntax.
The text was updated successfully, but these errors were encountered:
The
// WPCS:
syntax for whitelisting/ignoring, was specific to WPCS and is deprecated.Per the WordPress Coding Standards wiki
I intend to submit a PR to replace the deprecated syntax.
The text was updated successfully, but these errors were encountered: