Skip to content

Commit

Permalink
Expand WordPress.VIP.RestrictedFunctions removal
Browse files Browse the repository at this point in the history
- Now covers the whole sniff (until we implement the replacement functions)
- Adds TODO for re-including the get_posts sniff; the documented methods
  to do so do not appear to be functioning

Closes #20.
  • Loading branch information
Tim Malone committed Feb 27, 2018
1 parent 06dbd60 commit 4932361
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@
customised below. -->
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>

<!-- TODO: Removed until we learn/implement the potential replacement functions. -->
<exclude name="WordPress.VIP.RestrictedFunctions.file_get_contents"/>
<exclude name="WordPress.VIP.RestrictedFunctions.file_get_contents_file_get_contents"/>
<exclude name="WordPress.VIP.RestrictedFunctions.get_adjacent_post_get_next_post"/>
<exclude name="WordPress.VIP.RestrictedFunctions.get_adjacent_post_get_previous_post"/>
<exclude name="WordPress.VIP.RestrictedFunctions.get_term_link" />
<exclude name="WordPress.VIP.RestrictedFunctions.get_term_link_get_category_link" />
<exclude name="WordPress.VIP.RestrictedFunctions.get_term_link_get_tag_link" />
<exclude name="WordPress.VIP.RestrictedFunctions.get_posts_wp_get_recent_posts" />
<!-- TODO: Removed until we learn/implement the potential replacement functions (#20). -->
<!-- @see https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress/Sniffs/VIP/RestrictedFunctionsSniff.php -->
<exclude name="WordPress.VIP.RestrictedFunctions"/>

<!-- TODO: The one VIP RestrictedFunctions sniff we should keep for now is get_posts, however trying alternative options for re-including this have not been fruitful. -->
<!-- @see https://github.com/squizlabs/PHP_CodeSniffer/issues/1917 -->
<rule ref="WordPress.VIP.RestrictedFunctions.get_posts"/>

<!-- TODO: Removed due to incorrect indentation problems (issue #1). -->
<exclude name="WordPress.Arrays.ArrayIndentation.ItemNotAligned"/>
Expand Down

0 comments on commit 4932361

Please sign in to comment.