forked from gocodebox/lifterlms
-
Notifications
You must be signed in to change notification settings - Fork 2
/
phpcs.xml
92 lines (70 loc) · 3.9 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?xml version="1.0"?>
<ruleset name="LifterLMS Core">
<description>LifterLMS Rules for PHP_CodeSniffer</description>
<file>.</file>
<!-- Exclude Compiled JS files -->
<exclude-pattern>assets/js/llms.js</exclude-pattern>
<exclude-pattern>assets/js/llms-builder.js</exclude-pattern>
<exclude-pattern>assets/js/llms-metaboxes.js</exclude-pattern>
<!-- Exclude node packages -->
<exclude-pattern>packages/</exclude-pattern>
<!-- Exclude deprecated/legacy files -->
<exclude-pattern>includes/admin/analytics/*.php</exclude-pattern>
<exclude-pattern>includes/class.llms.analytics.php</exclude-pattern>
<exclude-pattern>includes/functions/llms-functions-deprecated.php</exclude-pattern>
<exclude-pattern>includes/admin/class.llms.admin.analytics.php</exclude-pattern>
<!-- Exclude libs -->
<exclude-pattern>includes/libraries/*.php</exclude-pattern>
<rule ref="LifterLMS">
<!-- @todo: Apply coding standards to js -->
<exclude-pattern>assets/js/*.js</exclude-pattern>
<!-- @todo: Fix docs and comments to adhere to these rules -->
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="Generic.Commenting.DocComment.LongNotCapital" />
<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
<exclude name="LifterLMS.Commenting.FileComment.PackageTagOrder" />
<exclude name="LifterLMS.Commenting.FileComment.SinceTagOrder" />
<exclude name="LifterLMS.Commenting.FileComment.MissingSinceTag" />
<exclude name="LifterLMS.Commenting.FileComment.MissingVersionTag" />
<exclude name="LifterLMS.Commenting.FileComment.VersionTagOrder" />
<exclude name="LifterLMS.Commenting.FileComment.MissingPackageTag" />
<exclude name="LifterLMS.Commenting.FileComment.DuplicateSinceTag" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.MissingSinceTag" />
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
<exclude name="Squiz.Commenting.ClassComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamName" />
<exclude name="Squiz.Commenting.VariableComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch" />
<exclude name="Squiz.Commenting.FunctionComment.InvalidReturnVoid" />
<!-- @todo: Update these to use a prefix, see https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#naming-conventions-prefix-everything-in-the-global-namespace -->
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited" />
<!-- @todo: extract is messy you're right, fix this -->
<exclude name="WordPress.PHP.DontExtract.extract_extract" />
<!-- @todo: Most core files break this rule. -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<!-- @todo: This needs to be adjusted since WP 5.3 -->
<exclude name="WordPress.DateTime.RestrictedFunctions.date_date" />
<!-- These templates follow WP Template style so they're okay -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>templates/taxonomy-*.php</exclude-pattern>
</exclude>
</rule>
<rule ref="WordPress.WP.I18n">
<!-- @todo: Fix all of these -->
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
<properties>
<property name="text_domain" value="lifterlms" />
</properties>
</rule>
<!-- @todo: Fix these issues. -->
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops.Found">
<exclude-pattern>assets/js/*.js</exclude-pattern>
</rule>
</ruleset>