1+ <?xml version =" 1.0" ?>
2+ <ruleset name =" plugins" >
3+ <description >Apply WordPress Coding Standards to all files</description >
4+ 5+ <!-- Only scan PHP files. -->
6+ <arg name =" extensions" value =" php" />
7+ 8+ <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
9+ <arg name =" cache" />
10+ 11+ <!-- Set the memory limit to 256M.
12+ For most standard PHP configurations, this means the memory limit will temporarily be raised.
13+ Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings
14+ -->
15+ <ini name =" memory_limit" value =" 256M" />
16+ 17+ <!-- Rule for checking the correct Text Domain. -->
18+ <rule ref =" WordPress.WP.I18n" >
19+ <properties >
20+ <property name =" text_domain" type =" array" >
21+ <element value =" twentytwentythree" />
22+ <element value =" default" />
23+ </property >
24+ </properties >
25+ </rule >
26+ 27+ <!-- Strip the filepaths down to the relevant bit. -->
28+ <arg name =" basepath" value =" ./" />
29+ 30+ <!-- Check up to 20 files simultaneously. -->
31+ <arg name =" parallel" value =" 20" />
32+ 33+ <!-- Show sniff codes in all reports. -->
34+ <arg value =" ps" />
35+ 36+ <file >.</file >
37+ 38+ <rule ref =" WordPress-Core" />
39+ <rule ref =" WordPress.CodeAnalysis.EmptyStatement" />
40+ 41+ <!-- These rules are being set as warnings instead of errors, so we can error check the entire codebase. -->
42+ <rule ref =" WordPress.PHP.YodaConditions.NotYoda" >
43+ <type >warning</type >
44+ </rule >
45+ <rule ref =" WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase" >
46+ <type >warning</type >
47+ </rule >
48+ <rule ref =" WordPress.DB.PreparedSQL.InterpolatedNotPrepared" >
49+ <type >warning</type >
50+ </rule >
51+ <rule ref =" WordPress.DB.PreparedSQL.NotPrepared" >
52+ <type >warning</type >
53+ </rule >
54+ <rule ref =" WordPress.Files.FileName.InvalidClassFileName" >
55+ <type >warning</type >
56+ </rule >
57+ 58+ <!-- Directories and third party library exclusions. -->
59+ <exclude-pattern >/vendor/*</exclude-pattern >
60+ <exclude-pattern >/node_modules/*</exclude-pattern >
61+ 62+ <!-- Assignments in while conditions are a valid method of looping over iterables. -->
63+ <rule ref =" WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition" >
64+ <exclude-pattern >*</exclude-pattern >
65+ </rule >
66+ 67+ <!-- We're not going to rename files. -->
68+ <rule ref =" WordPress.Files.FileName" >
69+ <exclude-pattern >*</exclude-pattern >
70+ </rule >
71+ </ruleset >
0 commit comments