-
Notifications
You must be signed in to change notification settings - Fork 5
/
phpcs.xml.dist
46 lines (39 loc) · 1.75 KB
/
phpcs.xml.dist
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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/.docker/*</exclude-pattern>
<exclude-pattern>/assets/simple-smtp.css</exclude-pattern><!-- Can't process minified files -->
<rule ref="WordPress" />
<!-- Argh, this... Please let me know if I'm doing something wrong. -->
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>smtp-config.js</exclude-pattern>
</rule>
<!-- Suggestions welcome. -->
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>class-log.php</exclude-pattern>
</rule>
<rule ref="WordPress.DB.PreparedSQL.NotPrepared">
<exclude-pattern>class-log.php</exclude-pattern>
</rule>
<!-- Happy to hear alternatives. This was the best I could conceive -->
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
<exclude-pattern>wp-simple-smtp.php</exclude-pattern>
</rule>
<rule ref="Universal.Arrays.DisallowShortArraySyntax">
<exclude-pattern>*/*</exclude-pattern>
</rule>
<!-- Test exclusions. -->
<!-- Triggered in the LogService test due to the mocked classes. -->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>tests/log/class-logservice-test.php</exclude-pattern>
</rule>
<!-- Same as above. -->
<rule ref="Generic.Files.OneObjectStructurePerFile.MultipleFound">
<exclude-pattern>tests/log/class-logservice-test.php</exclude-pattern>
</rule>
<!-- Some mocks will refer to variables that it will discard. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- ! Test exclusions. -->
</ruleset>