forked from WordPress/wporg-main-2022
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
46 lines (40 loc) · 2.17 KB
/
phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" ?>
<ruleset name="Project-specific Coding Standards Overrides">
<!--
Use the WordPress.org Meta Coding Standards for the project (from wporg-repo-tools),
but override a few specific rules in a few directories. This will let us keep using phpcs
on those directories without flagging known non-issues from generated or forked code.
-->
<!-- Import the shared PHPCS settings. -->
<rule ref="./phpcs.xml.dist" />
<!-- Allow unescaped content in patterns. -->
<rule ref="WordPress.Security.EscapeOutput.UnsafePrintingFunction">
<exclude-pattern>source/wp-content/themes/wporg-main-2022/patterns/*</exclude-pattern>
</rule>
<!-- Don't enforce commenting on forked files. -->
<rule ref="Squiz.Commenting.ClassComment.WrongStyle">
<exclude-pattern>env/export-content/includes/parser.php</exclude-pattern>
<exclude-pattern>env/export-content/includes/parsers/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>env/export-content/includes/parser.php</exclude-pattern>
<exclude-pattern>env/export-content/includes/parsers/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.WrongStyle">
<exclude-pattern>env/export-content/includes/parser.php</exclude-pattern>
<exclude-pattern>env/export-content/includes/parsers/*</exclude-pattern>
</rule>
<!-- Don't enforce yoda on forked files. -->
<rule ref="WordPress.PHP.YodaConditions.NotYoda">
<exclude-pattern>env/export-content/includes/parsers/*</exclude-pattern>
</rule>
<!-- Don't enforce file names on forked files. -->
<rule ref="WordPress.Files.FileName">
<exclude-pattern>env/export-content/includes/parsers/*</exclude-pattern>
</rule>
<!-- Don't enforce naming conventions, DomDocument/DOMXPath returns classes that use camelCase. -->
<rule ref="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase">
<exclude-pattern>env/export-content/includes/parser.php</exclude-pattern>
<exclude-pattern>env/export-content/includes/parsers/*</exclude-pattern>
</rule>
</ruleset>