WordPress.org

Make WordPress Core

Ticket #41057: phpcs.xml.2.dist

File phpcs.xml.2.dist, 4.1 KB (added by pento, 6 months ago)
Line 
1<?xml version="1.0"?>
2<ruleset name="WordPress Coding Standards">
3        <description>Apply WordPress Coding Standards to all Core files</description>
4
5        <rule ref="WordPress-Core" />
6
7        <arg name="extensions" value="php" />
8
9        <!-- Show sniff codes in all reports -->
10        <arg value="s" />
11
12        <arg name="encoding" value="utf-8" />
13
14        <file>.</file>
15
16        <rule ref="WordPress-Core">
17                <!-- Bug report: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/968 -->
18                <!--<exclude phpcbf-only="true" name="WordPress.Arrays.ArrayIndentation" />-->
19        </rule>
20
21        <rule ref="WordPress.Arrays.ArrayDeclaration.NoComma">
22                <!-- Bug report: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/998 -->
23                <exclude-pattern>/src/wp-admin/custom-background.php</exclude-pattern>
24                <exclude-pattern>/tests/phpunit/tests/pomo/po.php</exclude-pattern>
25        </rule>
26
27        <rule ref="Generic.WhiteSpace.ScopeIndent.Incorrect">
28                <!-- Bug report: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1000 -->
29                <exclude-pattern>/src/wp-admin/includes/class-walker-nav-menu-edit.php</exclude-pattern>
30                <exclude-pattern>/src/wp-admin/includes/network.php</exclude-pattern>
31                <exclude-pattern>/src/wp-admin/upload.php</exclude-pattern>
32                <exclude-pattern>/src/wp-admin/user-edit.php</exclude-pattern>
33                <exclude-pattern>/src/wp-includes/customize/class-wp-customize-nav-menu-control.php</exclude-pattern>
34        </rule>
35
36        <!--
37                These files exhibit similar behaviour as those running into WPCS#1000, but have other issues once
38                that rule is disabled for them. Exclude them for now, we can retest once WPCS#1000 is fixed.
39        -->
40        <exclude-pattern>/src/wp-admin/setup-config.php</exclude-pattern>
41        <exclude-pattern>/src/wp-admin/users.php</exclude-pattern>
42        <exclude-pattern>/src/wp-content/themes/twentyeleven/content-gallery.php</exclude-pattern>
43        <exclude-pattern>/tests/phpunit/tests/walker.php</exclude-pattern>
44
45        <rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired">
46                <!-- Fixed in PHPCS 3.0: https://github.com/squizlabs/PHP_CodeSniffer/pull/1496 -->
47                <exclude-pattern>/tests/phpunit/tests/pomo/po.php</exclude-pattern>
48        </rule>
49
50        <exclude-pattern>/build/*</exclude-pattern>
51        <exclude-pattern>/node_modules/*</exclude-pattern>
52
53        <exclude-pattern>/src/wp-content/plugins/*</exclude-pattern>
54
55        <exclude-pattern>/src/wp-admin/includes/class-ftp*</exclude-pattern>
56        <exclude-pattern>/src/wp-admin/includes/class-pclzip.php</exclude-pattern>
57        <exclude-pattern>/src/wp-admin/includes/deprecated.php</exclude-pattern>
58        <exclude-pattern>/src/wp-admin/includes/ms-deprecated.php</exclude-pattern>
59
60        <exclude-pattern>/src/wp-includes/atomlib.php</exclude-pattern>
61        <exclude-pattern>/src/wp-includes/class-IXR.php</exclude-pattern>
62        <exclude-pattern>/src/wp-includes/class-json.php</exclude-pattern>
63        <exclude-pattern>/src/wp-includes/class-phpass.php</exclude-pattern>
64        <exclude-pattern>/src/wp-includes/class-phpmailer.php</exclude-pattern>
65        <exclude-pattern>/src/wp-includes/class-pop3.php</exclude-pattern>
66        <exclude-pattern>/src/wp-includes/class-requests.php</exclude-pattern>
67        <exclude-pattern>/src/wp-includes/class-simplepie.php</exclude-pattern>
68        <exclude-pattern>/src/wp-includes/class-smtp.php</exclude-pattern>
69        <exclude-pattern>/src/wp-includes/class-snoopy.php</exclude-pattern>
70        <exclude-pattern>/src/wp-includes/deprecated.php</exclude-pattern>
71        <exclude-pattern>/src/wp-includes/ms-deprecated.php</exclude-pattern>
72        <exclude-pattern>/src/wp-includes/pluggable-deprecated.php</exclude-pattern>
73        <exclude-pattern>/src/wp-includes/rss.php</exclude-pattern>
74
75        <exclude-pattern>/src/wp-includes/ID3/*</exclude-pattern>
76        <exclude-pattern>/src/wp-includes/IXR/*</exclude-pattern>
77        <exclude-pattern>/src/wp-includes/random_compat/*</exclude-pattern>
78        <exclude-pattern>/src/wp-includes/Requests/*</exclude-pattern>
79        <exclude-pattern>/src/wp-includes/SimplePie/*</exclude-pattern>
80        <exclude-pattern>/src/wp-includes/Text/*</exclude-pattern>
81
82        <exclude-pattern>/tests/phpunit/build*</exclude-pattern>
83        <exclude-pattern>/tests/phpunit/data/plugins/wordpress-importer*</exclude-pattern>
84        <exclude-pattern>/tests/phpunit/data/.trac-ticket-cache*</exclude-pattern>
85</ruleset>