mirror of
https://gh.wpcy.net/https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-05-03 05:02:20 +08:00
While this sniff analyses comments, it is *not* a documentation related sniff, but rather a best practice sniff, so IMO, it should be in the `Extra` ruleset, not in the `Docs` ruleset. The PHPCS default for the `maxPercentage` property is 35%. This was previously upped in WPCS to 45% to prevent false positives for the `// End ...` comments. However, as that rule and the associated sniff, have been removed, a lower value should be fine. As a test case, I've ran the sniff over the `wp-admin` directory of WP Core and it looks like 40% should strike a good balance. * Some of what was found in core was correctly identified commented out. * Some were `// end` comments which should probably be removed. * Some were just very non-descriptive inline comments which should be improved. If needs be, we can tinker with the `maxPercentage` number a bit more in the future if we receive reports of false positives. |
||
|---|---|---|
| .. | ||
| ruleset.xml | ||