From ffc7b50e4be43d73c523ba4166710d5944dcb03b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 15 Sep 2023 09:06:23 +0000 Subject: [PATCH] Coding Standards: Improve organization of the WPCS-based PHPCS ruleset. This commit: * Adds section headers to the ruleset file. * Organizes all directives in their respective sections. No functional changes. Props jrf. See #59161. git-svn-id: https://develop.svn.wordpress.org/trunk@56593 602fd350-edb4-49c9-b593-d223f7449a82 --- phpcs.xml.dist | 365 +++++++++++++++++++++++++++---------------------- 1 file changed, 202 insertions(+), 163 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index b497b16cfc..a4a7fd6328 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -2,6 +2,13 @@ Apply WordPress Coding Standards to all Core files + + @@ -23,81 +30,15 @@ + + . - - - - - - warning - - - warning - - - warning - - - warning - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ^build/* @@ -165,80 +106,50 @@ /src/wp-content/themes/(?!twenty)* - - - /src/wp-includes/class-wpdb\.php - /tests/phpunit/tests/db/charset\.php - - - - /tests/phpunit/tests/db\.php + + + + + + + + warning - - /tests/phpunit/tests/db\.php + + warning - - /tests/phpunit/tests/db\.php + + warning + + + + + + + + + warning - /tests/phpunit/tests/admin/includesSchema\.php - /tests/phpunit/tests/multisite/site\.php + warning + + + warning - - - /src/wp-includes/class-wp-block-parser\.php - /src/wp-includes/class-wp-block-parser-block\.php - - - /src/wp-includes/class-wp-block-parser-block\.php - - - /src/wp-includes/class-wp-block-parser-block\.php - - - - - /src/wp-includes/l10n\.php - /tests/phpunit/tests/l10n\.php - /tests/phpunit/tests/l10n/loadTextdomainJustInTime\.php - - - - - /tests/* - - - - /wp-config\.php - /wp-config-sample\.php - /wp-tests-config\.php - /wp-tests-config-sample\.php - - - - - /wp-config\.php - /wp-config-sample\.php - - - - - - /src/wp-includes/template\.php - - - - - /src/_index\.php - /src/wp-admin/_index\.php - /src/wp-content/themes/twentythirteen/taxonomy-post_format\.php - /src/wp-content/themes/twentyfourteen/taxonomy-post_format\.php + warning @@ -282,6 +193,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -304,42 +271,43 @@ - - - warning - - - warning - - - warning - - - - - * + + + /wp-config\.php + /wp-config-sample\.php + - - - /tests/phpunit/tests/* + + /wp-config\.php + /wp-config-sample\.php + /wp-tests-config\.php + /wp-tests-config-sample\.php + /tests/phpunit/tests/* - - - - + /src/wp-admin/includes/class-wp-filesystem-ftpsockets\.php /src/wp-includes/class-wp-oembed\.php /src/wp-includes/class-wp-oembed-controller\.php /src/wp-includes/class-wp-xmlrpc-server\.php /src/wp-includes/class-wp-text-diff-renderer-inline\.php + + /src/wp-admin/includes/class-wp-list-table-compat\.php /src/wp-includes/class-wp-dependency\.php @@ -348,6 +316,43 @@ /src/wp-includes/class-wpdb\.php + + + * + + + + + /src/wp-includes/class-wpdb\.php + /tests/phpunit/tests/db/charset\.php + + + + + /tests/phpunit/tests/db\.php + + + /tests/phpunit/tests/db\.php + + + /tests/phpunit/tests/db\.php + + + /tests/phpunit/tests/admin/includesSchema\.php + /tests/phpunit/tests/multisite/site\.php + + + + + /src/wp-includes/template\.php + + + + + /tests/phpunit/tests/* + + /src/wp-admin/includes/class-wp-list-table-compat\.php @@ -357,4 +362,38 @@ /src/wp-content/themes/twentyfourteen/inc/widgets\.php /src/wp-content/themes/twentyfourteen/inc/featured-content\.php + + + + /src/_index\.php + /src/wp-admin/_index\.php + /src/wp-content/themes/twentythirteen/taxonomy-post_format\.php + /src/wp-content/themes/twentyfourteen/taxonomy-post_format\.php + + + + + /src/wp-includes/l10n\.php + /tests/phpunit/tests/l10n\.php + /tests/phpunit/tests/l10n/loadTextdomainJustInTime\.php + + + + + /tests/* + + + + + /src/wp-includes/class-wp-block-parser\.php + /src/wp-includes/class-wp-block-parser-block\.php + + + /src/wp-includes/class-wp-block-parser-block\.php + + + /src/wp-includes/class-wp-block-parser-block\.php + +