-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
53 lines (46 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
47
48
49
50
51
52
53
<?xml version="1.0"?>
<ruleset name="WordPress-Tabulate">
<!--
This file adapted from https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards#standards-subsets
Use this ruleset by running e.g. phpcs - - standard=phpcs.xml src
Run `phpcs` with the '-s' flag to see the names of the sniffs.
-->
<description>Sniffs for the coding standards of the Tabulate plugin</description>
<config name="installed_paths" value="../../wp-coding-standards/wpcs/" />
<!-- What files should be sniffed. -->
<file>./</file>
<exclude-pattern>./vendor/*</exclude-pattern>
<exclude-pattern>./assets/*</exclude-pattern>
<exclude-pattern>./docs/*</exclude-pattern>
<file>./assets/scripts.js</file>
<file>./assets/style.css</file>
<!-- Some coding standards above and beyond WordPress. -->
<rule ref="Squiz.PHP.CommentedOutCode" />
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter" />
<rule ref="Generic.ControlStructures.InlineControlStructure" />
<!-- Use *most* of WordPress' coding standards. -->
<rule ref="WordPress">
<exclude name="Generic.Files.LowercasedFilename.NotFound" />
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found" />
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
<exclude name="WordPress.CSRF.NonceVerification.NoNonceVerification" />
<exclude name="WordPress.WP.PreparedSQL.NotPrepared" />
<exclude name="WordPress.XSS.EscapeOutput" />
<exclude name="WordPress.VIP" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>
<!-- For some reason, this isn't excluded when added under the WordPress rule. -->
<rule ref="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing">
<severity>0</severity>
</rule>
<!-- Tests have a 'setUp' method, which is part of PHPUnit. -->
<rule ref="WordPress.NamingConventions.ValidFunctionName">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<!-- The main plugin file has a special file-level docblock. -->
<rule ref="Squiz.Commenting.FileComment.MissingPackageTag">
<exclude-pattern>./tabulate.php</exclude-pattern>
</rule>
</ruleset>