WordPress-Coding-Standards/WordPress-Extra
jrfnl b0445fa4a0 Move CommentedOutCode check from Docs to Extra
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.
2018-08-25 13:25:59 +02:00
..
ruleset.xml Move CommentedOutCode check from Docs to Extra 2018-08-25 13:25:59 +02:00