2017-12-01 04:40:04 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<ruleset name="WordPress Coding Standards">
|
|
|
|
<description>Apply WordPress Coding Standards to all Core files</description>
|
|
|
|
|
2019-09-25 16:01:51 +02:00
|
|
|
<!-- Only scan PHP files. -->
|
|
|
|
<arg name="extensions" value="php"/>
|
|
|
|
|
|
|
|
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
|
|
|
|
<arg name="cache"/>
|
|
|
|
|
|
|
|
<!-- Set the memory limit to 256M.
|
|
|
|
For most standard PHP configurations, this means the memory limit will temporarily be raised.
|
|
|
|
Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings
|
|
|
|
-->
|
|
|
|
<ini name="memory_limit" value="256M"/>
|
|
|
|
|
|
|
|
<!-- Strip the filepaths down to the relevant bit. -->
|
|
|
|
<arg name="basepath" value="./"/>
|
|
|
|
|
|
|
|
<!-- Check up to 20 files simultaneously. -->
|
|
|
|
<arg name="parallel" value="20"/>
|
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- Show sniff codes in all reports. -->
|
2019-09-25 16:01:51 +02:00
|
|
|
<arg value="ps"/>
|
|
|
|
|
|
|
|
<file>.</file>
|
|
|
|
|
2017-12-01 04:40:04 +01:00
|
|
|
<rule ref="WordPress-Core"/>
|
|
|
|
<rule ref="WordPress.CodeAnalysis.EmptyStatement"/>
|
|
|
|
|
Coding Standards: Move the remaining PHPCS errors to report as warnings, and add Travis tests.
The remaining error-level coding standards issues (specifically, associated with the sniffs `WordPress.PHP.YodaConditions.NotYoda`, `WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase`, `WordPress.DB.PreparedSQL.InterpolatedNotPrepared`, `WordPress.DB.PreparedSQL.NotPrepared`, and `WordPress.Files.FileName.InvalidClassFileName`) are marked as warnings, until they're all addressed.
This change allows us to run linting on Travis across the entire codebase, ensuring no other error-level violations can be introduced.
Additionally, PHPCS will now cache results locally, drastically improving performance for subsequent checks: scanning the entire codebase takes 1-2 minutes the first time, and less than one second for subsequent checks.
See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45665 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-19 09:47:16 +02:00
|
|
|
<!-- These rules are being set as warnings instead of errors, so we can error check the entire codebase. -->
|
|
|
|
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
|
|
|
|
<type>warning</type>
|
|
|
|
</rule>
|
|
|
|
<rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared">
|
|
|
|
<type>warning</type>
|
|
|
|
</rule>
|
|
|
|
<rule ref="WordPress.DB.PreparedSQL.NotPrepared">
|
|
|
|
<type>warning</type>
|
|
|
|
</rule>
|
|
|
|
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
|
|
|
|
<type>warning</type>
|
|
|
|
</rule>
|
|
|
|
|
2019-01-12 07:05:55 +01:00
|
|
|
<rule ref="WordPress.NamingConventions.ValidVariableName">
|
|
|
|
<properties>
|
|
|
|
<property name="customPropertiesWhitelist" type="array">
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From database structure queries. -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="Collation"/>
|
|
|
|
<element value="Column_name"/>
|
|
|
|
<element value="Default"/>
|
|
|
|
<element value="Extra"/>
|
|
|
|
<element value="Field"/>
|
|
|
|
<element value="Index_type"/>
|
|
|
|
<element value="Key"/>
|
|
|
|
<element value="Key_name"/>
|
|
|
|
<element value="Msg_text"/>
|
|
|
|
<element value="Non_unique"/>
|
|
|
|
<element value="Null"/>
|
|
|
|
<element value="Sub_part"/>
|
|
|
|
<element value="Type"/>
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From plugin/theme data. -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="authorAndUri"/>
|
|
|
|
<element value="Name"/>
|
|
|
|
<element value="Version"/>
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From the result of wp_xmlrpc_server::wp_getPageList(). -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="dateCreated"/>
|
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From DOMDocument. -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="childNodes"/>
|
|
|
|
<element value="formatOutput"/>
|
|
|
|
<element value="nodeName"/>
|
|
|
|
<element value="nodeType"/>
|
|
|
|
<element value="parentNode"/>
|
|
|
|
<element value="preserveWhiteSpace"/>
|
|
|
|
<element value="textContent"/>
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From PHPMailer. -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="AltBody"/>
|
|
|
|
<element value="Body"/>
|
|
|
|
<element value="CharSet"/>
|
|
|
|
<element value="ContentType"/>
|
|
|
|
<element value="Encoding"/>
|
|
|
|
<element value="Hostname"/>
|
|
|
|
<element value="mailHeader"/>
|
|
|
|
<element value="MIMEBody"/>
|
|
|
|
<element value="MIMEHeader"/>
|
|
|
|
<element value="Sender"/>
|
|
|
|
<element value="Subject"/>
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From PHPUnit_Util_Getopt. -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="longOptions"/>
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From POP3. -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="ERROR"/>
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- From ZipArchive. -->
|
2019-01-12 07:05:55 +01:00
|
|
|
<element value="numFiles"/>
|
|
|
|
</property>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
2018-08-17 03:50:26 +02:00
|
|
|
<!-- Exclude the build folder in the current directory, as Travis puts the checkout in a build directory. -->
|
|
|
|
<exclude-pattern type="relative">^build/*</exclude-pattern>
|
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- Directories and third party library exclusions. -->
|
2017-12-01 04:40:04 +01:00
|
|
|
<exclude-pattern>/node_modules/*</exclude-pattern>
|
|
|
|
<exclude-pattern>/vendor/*</exclude-pattern>
|
|
|
|
|
|
|
|
<exclude-pattern>/src/wp-admin/includes/class-ftp*</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-admin/includes/class-pclzip\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-admin/includes/deprecated\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-admin/includes/ms-deprecated\.php</exclude-pattern>
|
|
|
|
|
|
|
|
<exclude-pattern>/src/wp-includes/atomlib\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-IXR\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-json\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-phpass\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-pop3\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-requests\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-simplepie\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-snoopy\.php</exclude-pattern>
|
2019-01-12 05:00:42 +01:00
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-block-parser\.php</exclude-pattern>
|
2017-12-01 04:40:04 +01:00
|
|
|
<exclude-pattern>/src/wp-includes/deprecated\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/ms-deprecated\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/pluggable-deprecated\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/rss\.php</exclude-pattern>
|
|
|
|
|
2020-01-03 14:15:33 +01:00
|
|
|
<exclude-pattern>/src/wp-includes/assets/*</exclude-pattern>
|
2019-01-12 05:00:42 +01:00
|
|
|
<exclude-pattern>/src/wp-includes/blocks/*</exclude-pattern>
|
2017-12-01 04:40:04 +01:00
|
|
|
<exclude-pattern>/src/wp-includes/ID3/*</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/IXR/*</exclude-pattern>
|
2019-07-03 01:41:16 +02:00
|
|
|
<exclude-pattern>/src/wp-includes/js/*</exclude-pattern>
|
2020-06-13 14:34:12 +02:00
|
|
|
<exclude-pattern>/src/wp-includes/PHPMailer/*</exclude-pattern>
|
2017-12-01 04:40:04 +01:00
|
|
|
<exclude-pattern>/src/wp-includes/random_compat/*</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/Requests/*</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/SimplePie/*</exclude-pattern>
|
2019-03-21 06:55:05 +01:00
|
|
|
<exclude-pattern>/src/wp-includes/sodium_compat/*</exclude-pattern>
|
2020-06-13 14:34:12 +02:00
|
|
|
<exclude-pattern>/src/wp-includes/Text/*</exclude-pattern>
|
2017-12-01 04:40:04 +01:00
|
|
|
|
2019-01-12 05:00:42 +01:00
|
|
|
<exclude-pattern>/tests/phpunit/includes/speed-trap-listener\.php</exclude-pattern>
|
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- Test data and fixtures. -->
|
2017-12-01 04:40:04 +01:00
|
|
|
<exclude-pattern>/tests/phpunit/build*</exclude-pattern>
|
|
|
|
<exclude-pattern>/tests/phpunit/data/*</exclude-pattern>
|
|
|
|
|
|
|
|
<exclude-pattern>/tools/*</exclude-pattern>
|
|
|
|
|
2020-05-02 20:15:30 +02:00
|
|
|
<!-- Drop-in plugins. -->
|
|
|
|
<exclude-pattern>/src/wp-content/advanced-cache\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/blog-deleted\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/blog-inactive\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/blog-suspended\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/db-error\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/db\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/fatal-error-handler\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/install\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/maintenance\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/object-cache\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/php-error\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/sunrise\.php</exclude-pattern>
|
|
|
|
|
|
|
|
<!-- Must-Use plugins. -->
|
|
|
|
<exclude-pattern>/src/wp-content/mu-plugins/*</exclude-pattern>
|
|
|
|
|
|
|
|
<!-- Plugins. -->
|
|
|
|
<exclude-pattern>/src/wp-content/plugins/*</exclude-pattern>
|
|
|
|
|
|
|
|
<!-- Themes except the twenty* themes. -->
|
|
|
|
<exclude-pattern>/src/wp-content/themes/(?!twenty)*</exclude-pattern>
|
|
|
|
|
2017-12-01 04:40:04 +01:00
|
|
|
<!-- Whitelist the WP DB Class and related tests for usage of direct database access functions. -->
|
|
|
|
<rule ref="WordPress.DB.RestrictedFunctions">
|
|
|
|
<exclude-pattern>/src/wp-includes/wp-db\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/db/charset\.php</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
|
|
|
<!-- Whitelist the WP DB related tests for issues with prepared SQL placeholders
|
|
|
|
(as the handling of those are being tested). -->
|
|
|
|
<rule ref="WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare">
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/db\.php</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
<rule ref="WordPress.DB.PreparedSQLPlaceholders.UnsupportedPlaceholder">
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/db\.php</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
<rule ref="WordPress.DB.PreparedSQLPlaceholders.UnescapedLiteral">
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/db\.php</exclude-pattern>
|
|
|
|
</rule>
|
2018-09-14 09:54:53 +02:00
|
|
|
<rule ref="WordPress.DB.PreparedSQL.NotPrepared">
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/admin/includesSchema\.php</exclude-pattern>
|
2018-09-24 17:22:01 +02:00
|
|
|
<exclude-pattern>/tests/phpunit/tests/multisite/site\.php</exclude-pattern>
|
2018-09-14 09:54:53 +02:00
|
|
|
</rule>
|
2018-06-15 17:56:58 +02:00
|
|
|
|
|
|
|
<!-- Whitelist the I18n functions file from issues identified by the I18n sniff
|
2020-02-07 20:14:29 +01:00
|
|
|
(such as calling the low-level translate() function). -->
|
2018-06-15 17:56:58 +02:00
|
|
|
<rule ref="WordPress.WP.I18n">
|
|
|
|
<exclude-pattern>/src/wp-includes/l10n\.php</exclude-pattern>
|
2019-01-11 07:03:46 +01:00
|
|
|
<exclude-pattern>/tests/phpunit/tests/l10n\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/l10n/loadTextdomainJustInTime\.php</exclude-pattern>
|
2018-06-15 17:56:58 +02:00
|
|
|
</rule>
|
2017-12-01 04:40:04 +01:00
|
|
|
|
2019-07-05 10:03:40 +02:00
|
|
|
<!-- Translator comments aren't needed in unit tests. -->
|
|
|
|
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
|
|
|
|
<exclude-pattern>/tests/*</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2017-12-01 04:40:04 +01:00
|
|
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing">
|
|
|
|
<exclude-pattern>/wp-config\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/wp-config-sample\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/wp-tests-config\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/wp-tests-config-sample\.php</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2019-05-28 02:25:42 +02:00
|
|
|
<!-- Exclude checking of line endings when reporting errors, but fix them when running phpcbf.
|
2020-02-07 20:14:29 +01:00
|
|
|
Git and SVN manage these pretty well cross-platform as "native".
|
|
|
|
Whitelist configuration files. -->
|
2018-08-17 03:50:26 +02:00
|
|
|
<rule ref="Generic.Files.LineEndings">
|
|
|
|
<exclude-pattern>/wp-config\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/wp-config-sample\.php</exclude-pattern>
|
2019-05-28 02:25:42 +02:00
|
|
|
<exclude phpcs-only="true" name="Generic.Files.LineEndings"/>
|
2018-08-17 03:50:26 +02:00
|
|
|
</rule>
|
|
|
|
|
2019-01-11 05:59:23 +01:00
|
|
|
<!-- WPCS1620: template.php isn't a template tag file. -->
|
|
|
|
<rule ref="WordPress.Files.FileName.InvalidTemplateTagFileName">
|
|
|
|
<exclude-pattern>/src/wp-includes/template\.php</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2019-01-11 07:16:35 +01:00
|
|
|
<!-- WPCS1621: These files are expected to use _ instead of -. -->
|
|
|
|
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
|
|
|
|
<exclude-pattern>/src/_index\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-admin/_index\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/themes/twentythirteen/taxonomy-post_format\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/themes/twentyfourteen/taxonomy-post_format\.php</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2017-12-01 04:40:04 +01:00
|
|
|
<!-- Whitelist test classes for select sniffs. -->
|
|
|
|
<rule ref="WordPress.Files.FileName">
|
|
|
|
<properties>
|
2019-07-08 02:55:20 +02:00
|
|
|
<property name="custom_test_class_whitelist" type="array">
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- Test case parent classes. -->
|
2019-07-08 02:55:20 +02:00
|
|
|
<element value="WP_UnitTestCase"/>
|
|
|
|
<element value="WP_Ajax_UnitTestCase"/>
|
|
|
|
<element value="WP_Canonical_UnitTestCase"/>
|
|
|
|
<element value="WP_Test_REST_TestCase"/>
|
|
|
|
<element value="WP_Test_REST_Controller_Testcase"/>
|
|
|
|
<element value="WP_Test_REST_Post_Type_Controller_Testcase"/>
|
|
|
|
<element value="WP_XMLRPC_UnitTestCase"/>
|
|
|
|
<element value="WP_Filesystem_UnitTestCase"/>
|
|
|
|
<element value="WP_Image_UnitTestCase"/>
|
|
|
|
<element value="WP_HTTP_UnitTestCase"/>
|
|
|
|
<element value="WP_Tests_Image_Resize_UnitTestCase"/>
|
|
|
|
<element value="WP_Import_UnitTestCase"/>
|
|
|
|
<element value="Tests_Query_Conditionals"/>
|
Sitemaps: Add XML sitemaps functionality to WordPress.
While web crawlers are able to discover pages from links within the site and from other sites, XML sitemaps supplement this approach by allowing crawlers to quickly and comprehensively identify all URLs included in the sitemap and learn other signals about those URLs using the associated metadata.
See https://make.wordpress.org/core/2020/06/10/merge-announcement-extensible-core-sitemaps/ for more details.
This feature exposes the sitemap index via `/wp-sitemap.xml` and exposes a variety of new filters and hooks for developers to modify the behavior. Users can disable sitemaps completely by turning off search engine visibility in WordPress admin.
This change also introduces a new `esc_xml()` function to escape strings for output in XML, as well as XML support to `wp_kses_normalize_entities()`.
Props Adrian McShane, afragen, adamsilverstein, casiepa, flixos90, garrett-eclipse, joemcgill, kburgoine, kraftbj, milana_cap, pacifika, pbiron, pfefferle, Ruxandra Gradina, swissspidy, szepeviktor, tangrufus, tweetythierry.
Fixes #50117.
See #3670. See #19998.
git-svn-id: https://develop.svn.wordpress.org/trunk@48072 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 17:22:49 +02:00
|
|
|
<element value="WP_Test_XML_TestCase"/>
|
2019-07-08 02:55:20 +02:00
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- Mock classes. -->
|
2019-07-08 02:55:20 +02:00
|
|
|
<element value="Spy_REST_Server"/>
|
|
|
|
<element value="WP_REST_Test_Controller"/>
|
|
|
|
<element value="WP_Image_Editor_Mock"/>
|
|
|
|
<element value="WP_Filesystem_MockFS"/>
|
|
|
|
<element value="MockPHPMailer"/>
|
|
|
|
<element value="MockAction"/>
|
|
|
|
<element value="WP_Object_Cache"/>
|
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- PHPUnit helpers. -->
|
2019-07-08 02:55:20 +02:00
|
|
|
<element value="TracTickets"/>
|
|
|
|
<element value="WP_PHPUnit_Util_Getopt"/>
|
|
|
|
<element value="PHPUnit_Util_Test"/>
|
|
|
|
<element value="WPProfiler"/>
|
|
|
|
<element value="SpeedTrapListener"/>
|
|
|
|
<element value="PHPUnit_Framework_Exception"/>
|
|
|
|
</property>
|
2017-12-01 04:40:04 +01:00
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
2019-07-09 07:44:42 +02:00
|
|
|
<rule ref="WordPress.PHP.NoSilencedErrors">
|
|
|
|
<properties>
|
|
|
|
<property name="custom_whitelist" type="array">
|
|
|
|
<element value="ssh2_connect"/>
|
|
|
|
<element value="ssh2_auth_password"/>
|
|
|
|
<element value="ssh2_auth_pubkey_file"/>
|
|
|
|
<element value="ftp_ssl_connect"/>
|
|
|
|
<element value="ftp_connect"/>
|
|
|
|
<element value="ftp_get_option"/>
|
|
|
|
<element value="ftp_set_option"/>
|
|
|
|
<element value="disk_free_space"/>
|
|
|
|
<element value="getimagesize"/>
|
|
|
|
<element value="iptcparse"/>
|
|
|
|
<element value="exif_read_data"/>
|
|
|
|
<element value="gzinflate"/>
|
|
|
|
<element value="gzuncompress"/>
|
|
|
|
<element value="gzdecode"/>
|
|
|
|
</property>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
2020-02-07 20:14:29 +01:00
|
|
|
<!-- Enforce no parenthesis for language constructs, and only one space immediately after.
|
|
|
|
Including this rule is temporary until it is moved from the WordPress-Extra ruleset to
|
|
|
|
the WordPress-Core ruleset upstream.
|
|
|
|
-->
|
|
|
|
<rule ref="PEAR.Files.IncludingFile.BracketsNotRequired">
|
|
|
|
<type>warning</type>
|
|
|
|
</rule>
|
|
|
|
<rule ref="PEAR.Files.IncludingFile.UseRequire">
|
|
|
|
<type>warning</type>
|
|
|
|
</rule>
|
|
|
|
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
|
|
|
|
<type>warning</type>
|
|
|
|
</rule>
|
|
|
|
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- Assignments in while conditions are a valid method of looping over iterables. -->
|
2019-07-05 05:13:31 +02:00
|
|
|
<rule ref="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition">
|
|
|
|
<exclude-pattern>*</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2017-12-01 04:40:04 +01:00
|
|
|
<!-- Exclude the unit tests from select sniffs. -->
|
|
|
|
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/*</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
|
|
|
|
<exclude-pattern>/tests/phpunit/tests/*</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2020-01-29 01:43:23 +01:00
|
|
|
<!-- Exclude some old classes that can't be renamed, as it would break back compat. -->
|
2019-07-17 06:33:27 +02:00
|
|
|
<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
|
|
|
|
<exclude-pattern>/src/wp-admin/includes/class-wp-filesystem-ftpsockets\.php</exclude-pattern>
|
2019-07-19 06:42:00 +02:00
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-oembed\.php</exclude-pattern>
|
2019-07-17 06:33:27 +02:00
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-oembed-controller\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-xmlrpc-server\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-text-diff-renderer-inline\.php</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
|
|
|
|
<exclude-pattern>/src/wp-admin/includes/class-wp-list-table-compat\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-editor\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-xmlrpc-server\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/wp-db\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-dependency\.php</exclude-pattern>
|
|
|
|
</rule>
|
2019-07-19 05:49:26 +02:00
|
|
|
|
|
|
|
<!-- Exclude some incorrectly named files that won't be renamed. -->
|
|
|
|
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
|
|
|
|
<exclude-pattern>/src/wp-admin/includes/class-wp-list-table-compat\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-dependency\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-includes/class-wp-editor\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/themes/twentyeleven/inc/widgets\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/themes/twentyfourteen/inc/widgets\.php</exclude-pattern>
|
|
|
|
<exclude-pattern>/src/wp-content/themes/twentyfourteen/inc/featured-content\.php</exclude-pattern>
|
|
|
|
</rule>
|
2017-12-01 04:40:04 +01:00
|
|
|
</ruleset>
|