|
1 | 1 | <?xml version="1.0"?>
|
2 | 2 | <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3 |
| - name="Beapi frontend framework" |
4 |
| - xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd" |
5 |
| - > |
| 3 | + name="WP Skeleton" |
| 4 | + xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"> |
6 | 5 |
|
7 | 6 | <description>A custom set of rules to check for a WPized WordPress project</description>
|
8 | 7 |
|
9 | 8 | <!-- Scan only PHP files -->
|
10 | 9 | <arg name="extensions" value="php"/>
|
11 | 10 |
|
12 |
| - <!-- Exclude the plugins --> |
13 |
| - <exclude-pattern>vendor/</exclude-pattern> |
14 |
| - <exclude-pattern>dist/</exclude-pattern> |
15 |
| - <exclude-pattern>src/</exclude-pattern> |
16 |
| - <exclude-pattern>scripts/</exclude-pattern> |
| 11 | + <!-- Scan all files in directory --> |
| 12 | + <file>.</file> |
17 | 13 |
|
18 |
| - <!-- <<< EXCLUDE EXTERNAL (MU-)PLUGINS OR THEMES HERE >>> --> |
| 14 | + <!-- Exclude the Composer Vendor directory. --> |
| 15 | + <exclude-pattern>web/app/themes/*/src/</exclude-pattern> |
| 16 | + <exclude-pattern>web/app/themes/*/autoload.php</exclude-pattern> |
19 | 17 |
|
20 | 18 | <rule ref="WordPress-Extra">
|
21 | 19 | <!-- Exclude as we use a custom autoloader. -->
|
|
31 | 29 | <exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
|
32 | 30 | </rule>
|
33 | 31 |
|
34 |
| - <rule ref="WordPress.Security.EscapeOutput"> |
35 |
| - <properties> |
36 |
| - <property name="customAutoEscapedFunctions" type="array"> |
37 |
| - <element value="\BEA\Theme\Framework\Helpers\Svg\get_the_icon"/> |
38 |
| - <element value="\BEA\Theme\Framework\Helpers\Svg\the_icon"/> |
39 |
| - <element value="bea_get_attachment_image"/> |
40 |
| - <element value="get_the_image"/> |
41 |
| - <element value="get_the_link"/> |
42 |
| - <element value="get_acf_link"/> |
43 |
| - <element value="get_share_link"/> |
44 |
| - <element value="get_terms_name"/> |
45 |
| - <element value="get_terms_list"/> |
46 |
| - <element value="get_the_text"/> |
47 |
| - </property> |
48 |
| - </properties> |
49 |
| - </rule> |
50 |
| - |
| 32 | + <rule ref="Generic.Arrays.DisallowLongArraySyntax"/> |
51 | 33 |
|
52 | 34 | <!-- Show sniff name in report. -->
|
53 | 35 | <arg value="sp"/>
|
|
62 | 44 | <ini name="memory_limit" value="512M"/>
|
63 | 45 | <ini name="max_execution_time" value="-1"/>
|
64 | 46 |
|
65 |
| - <rule ref="PHPCompatibility"/> |
66 |
| - <config name="testVersion" value="7.4-"/> |
| 47 | + <rule ref="WordPress.Security.EscapeOutput"> |
| 48 | + <properties> |
| 49 | + <property name="customAutoEscapedFunctions" type="array"> |
| 50 | + <element value="bea_get_attachment_image" /> |
| 51 | + <element value="get_the_icon"/> |
| 52 | + <element value="get_the_image"/> |
| 53 | + <element value="get_the_image"/> |
| 54 | + <element value="get_the_link"/> |
| 55 | + <element value="get_acf_link"/> |
| 56 | + <element value="get_share_link"/> |
| 57 | + <element value="get_the_text"/> |
| 58 | + <element value="get_terms_list"/> |
| 59 | + <element value="get_languages_list"/> |
| 60 | + <element value="get_languages_list_selector"/> |
| 61 | + </property> |
| 62 | + </properties> |
| 63 | + </rule> |
67 | 64 | </ruleset>
|
0 commit comments