Skip to content

Commit 9756fe2

Browse files
committed
Adding Squiz.PHP.CommentedOutCode sniff to the ruleset
This commit also contains related changes to the integration tests
1 parent 86f4983 commit 9756fe2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

WordPressVIPMinimum/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<include-pattern>*.php</include-pattern>
3030
<include-pattern>*.inc</include-pattern>
3131
</rule>
32+
<rule ref="Squiz.PHP.CommentedOutCode"/>
3233

3334
<!-- https://vip.wordpress.com/documentation/vip/code-review-what-we-look-for/#eval-and-create_function -->
3435
<rule ref="Squiz.PHP.Eval"/>

ruleset_test.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,7 @@ if ( $a = 1 ) {} // Bad. Warning.
161161

162162
add_option( 'taxonomy_rating_' . $obj->term_id ); // Bad. Warning.
163163

164+
//wpcom_vip_load_plugin( 'disqus' ); // Bad. Warning.
165+
164166
?>
165167

ruleset_test.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
131 => 1,
4949
133 => 1,
5050
157 => 1,
51-
164 => 1, // Error on the end of the file. When any code is added, bounce this.
51+
166 => 1, // Error on the end of the file. When any code is added, bounce this.
5252
),
5353
'warnings' => array(
5454
9 => 1,
@@ -71,6 +71,7 @@
7171
155 => 1,
7272
160 => 1,
7373
162 => 1,
74+
164 => 1,
7475
),
7576
'messages' => array(
7677
129 => array(

0 commit comments

Comments
 (0)