Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,13 @@ $_SERVER["REMOTE_ADDR"]; // Error.

// WordPress.CodeAnalysis.AssignmentInTernaryCondition
$var = ($a = 123) ? $a : 0; // Warning.

// WordPress.WP.CronInterval
function my_add_weekly( $schedules ) {
$schedules['every_30_seconds'] = array(
'interval' => 30,
'display' => __( 'Once every 30 seconds' )
);
return $schedules;
}
add_filter( 'cron_schedules', 'my_add_weekly'); // Warning.
1 change: 1 addition & 0 deletions WordPress-VIP-Go/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
550 => 1,
556 => 1,
579 => 1,
589 => 1,
],
'messages' => [
7 => [
Expand Down
7 changes: 7 additions & 0 deletions WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@
<rule ref="WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn">
<severity>3</severity>
</rule>
<rule ref="WordPress.WP.CronInterval">
<!-- cron runs async on VIP's batch containers, so high frequency schedules will not negatively impact performance. Cron runner polling interval is 60s, so make that the min -->
<properties>
<property name="min_interval" value="60"/>
</properties>
</rule>

<!-- Silence is golden, these don't affect us on VIP Go -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable">
Expand All @@ -254,4 +260,5 @@
<rule ref="WordPress.Security.EscapeOutput.ExceptionNotEscaped">
<severity>0</severity>
</rule>

</ruleset>