mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-07-15 04:26:13 +09:00
232 lines
8.0 KiB
XML
232 lines
8.0 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="WordPress VIP">
|
|
<description>Deprecated WordPress.com VIP Coding Standards. Use the official VIP coding standards instead which can be found at https://github.com/Automattic/VIP-Coding-Standards</description>
|
|
|
|
<!-- For info on WPCOM requirements: https://lobby.vip.wordpress.com/wordpress-com-documentation/code-review-what-we-look-for/ -->
|
|
<!-- For info on VIP-Go requirements: https://vip.wordpress.com/documentation/vip-go/code-review-blockers-warnings-notices/ -->
|
|
|
|
<autoload>./../WordPress/PHPCSAliases.php</autoload>
|
|
|
|
<rule ref="WordPress-Core"/>
|
|
|
|
<rule ref="WordPress.VIP"/>
|
|
|
|
<rule ref="WordPress.Security.EscapeOutput"/>
|
|
<rule ref="WordPress.Security.NonceVerification"/>
|
|
|
|
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/69 -->
|
|
<rule ref="WordPress.Security.ValidatedSanitizedInput"/>
|
|
|
|
<rule ref="WordPress.PHP.StrictComparisons"/>
|
|
|
|
<rule ref="Squiz.PHP.CommentedOutCode">
|
|
<properties>
|
|
<property name="maxPercentage" value="45"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.PHP.DiscouragedPHPFunctions">
|
|
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/pull/633#issuecomment-266634811 -->
|
|
<properties>
|
|
<property name="exclude" type="array" value="obfuscation"/>
|
|
</properties>
|
|
</rule>
|
|
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration">
|
|
<type>error</type>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.PHP.DevelopmentFunctions"/>
|
|
<rule ref="WordPress.PHP.DevelopmentFunctions.error_log">
|
|
<type>error</type>
|
|
</rule>
|
|
<rule ref="WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure">
|
|
<type>error</type>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.PHP.StrictInArray"/>
|
|
|
|
<rule ref="WordPress.WP.AlternativeFunctions"/>
|
|
<!-- VIP recommends other functions -->
|
|
<rule ref="WordPress.WP.AlternativeFunctions.curl">
|
|
<message>Using cURL functions is highly discouraged within VIP context. Check (Fetching Remote Data) on VIP Documentation.</message>
|
|
</rule>
|
|
<rule ref="WordPress.WP.AlternativeFunctions.file_get_contents">
|
|
<message>%s() is highly discouraged, please use vip_safe_wp_remote_get() instead.</message>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.WP.DiscouragedConstants"/>
|
|
|
|
<rule ref="WordPress.DB.DirectDatabaseQuery"/>
|
|
<rule ref="WordPress.DB.DirectDatabaseQuery.SchemaChange">
|
|
<type>error</type>
|
|
<message>Attempting a database schema change is highly discouraged.</message>
|
|
</rule>
|
|
<rule ref="WordPress.DB.DirectDatabaseQuery.NoCaching">
|
|
<type>error</type>
|
|
<message>Usage of a direct database call without caching is prohibited on the VIP platform. Use wp_cache_get / wp_cache_set or wp_cache_delete.</message>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.DB.SlowDBQuery"/>
|
|
|
|
<rule ref="WordPress.Security.PluginMenuSlug"/>
|
|
<rule ref="WordPress.Security.PluginMenuSlug.Using__FILE__">
|
|
<type>error</type>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.WP.CronInterval"/>
|
|
<rule ref="WordPress.WP.CronInterval.CronSchedulesInterval">
|
|
<type>error</type>
|
|
<message>Scheduling crons at %s sec ( less than %s minutes ) is prohibited.</message>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.WP.TimezoneChange"/>
|
|
|
|
<rule ref="WordPress.WP.PostsPerPage"/>
|
|
<rule ref="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page">
|
|
<type>error</type>
|
|
</rule>
|
|
<rule ref="WordPress.WP.PostsPerPage.posts_per_page_numberposts">
|
|
<type>error</type>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.Security.SafeRedirect"/>
|
|
|
|
<!--
|
|
#############################################################################
|
|
Account for deprecated sniffs.
|
|
These directives can be removed when the deprecated sniffs are removed.
|
|
#############################################################################
|
|
-->
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.AdminBarRemoval.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.DirectDatabaseQuery.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent duplicate messages from deprecated sniff. -->
|
|
<rule ref="WordPress.VIP.DirectDatabaseQuery.SchemaChange">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.DirectDatabaseQuery.DirectQuery">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.DirectDatabaseQuery.NoCaching">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.SlowDBQuery.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent duplicate messages from deprecated sniff. -->
|
|
<rule ref="WordPress.VIP.SlowDBQuery.slow_db_query_tax_query">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.SlowDBQuery.slow_db_query_meta_query">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.SlowDBQuery.slow_db_query_meta_key">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.SlowDBQuery.slow_db_query_meta_value">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.SlowDBQuery.DeprecatedWhitelistFlagFound">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.PluginMenuSlug.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent duplicate messages from deprecated sniff. -->
|
|
<rule ref="WordPress.VIP.PluginMenuSlug.Using__FILE__">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.ValidatedSanitizedInput.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent duplicate messages from deprecated sniff. -->
|
|
<rule ref="WordPress.VIP.ValidatedSanitizedInput.InputNotSanitized">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.ValidatedSanitizedInput.MissingUnslash">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.ValidatedSanitizedInput.InputNotValidated">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.ValidatedSanitizedInput.InputNotValidatedNotSanitized">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.CronInterval.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent duplicate messages from deprecated sniff. -->
|
|
<rule ref="WordPress.VIP.CronInterval.CronSchedulesInterval">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="WordPress.VIP.CronInterval.ChangeDetected">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.FileSystemWritesDisallow.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.OrderByRand.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.RestrictedFunctions.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.RestrictedVariables.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.SessionFunctionsUsage.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.SessionVariableUsage.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.SuperGlobalInputUsage.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
|
|
<rule ref="WordPress.VIP.TimezoneChange.DeprecatedSniff">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<!-- Prevent duplicate messages from deprecated sniff. -->
|
|
<rule ref="WordPress.VIP.TimezoneChange.timezone_change_date_default_timezone_set">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
</ruleset>
|