forked from Strategy11/formidable-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
89 lines (83 loc) · 3.61 KB
/
Copy pathphpcs.xml
File metadata and controls
89 lines (83 loc) · 3.61 KB
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
<?xml version="1.0"?>
<ruleset name="Formidable Forms">
<description>Formidable Forms rules for PHP_CodeSniffer</description>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>deprecated/*</exclude-pattern>
<exclude-pattern>bin/*</exclude-pattern>
<exclude-pattern>languages/formidable-js-strings.php</exclude-pattern>
<arg name="extensions" value="php" />
<arg value="nsp" />
<rule ref="WordPress">
<exclude name="Squiz.Commenting" />
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.PHP.YodaConditions" />
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="formidable"/>
</property>
</properties>
</rule>
<rule ref="Squiz.Scope.StaticThisUsage" />
<!-- MEDIUM PRIORITY ITEMS TO FIX -->
<rule ref="Squiz.PHP.EmbeddedPhp.ContentBeforeOpen">
<exclude-pattern>classes/views/*</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.EmbeddedPhp.ContentAfterEnd">
<exclude-pattern>classes/views/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride">
<exclude-pattern>css/_single_theme.css.php</exclude-pattern>
<exclude-pattern>classes/views/*</exclude-pattern>
<exclude-pattern>classes/models/FrmDb.php</exclude-pattern>
<exclude-pattern>classes/controllers/FrmFormsController.php</exclude-pattern>
<exclude-pattern>classes/helpers/FrmEntriesListHelper.php</exclude-pattern>
<exclude-pattern>classes/helpers/FrmFormsListHelper.php</exclude-pattern>
</rule>
<!-- Exclude specific rules for unit tests (fix when possible) -->
<rule ref="WordPress.Security.NonceVerification.Missing">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.PreparedSQL.NotPrepared">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.EscapeOutput.OutputNotEscaped">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.InputNotValidated">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.MissingUnslash">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- These rules likely won't see any changes for compatibility -->
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
<!-- the getOne and getAll functions all break this rule -->
<exclude-pattern>classes/models/FrmField.php</exclude-pattern>
<exclude-pattern>classes/models/FrmForm.php</exclude-pattern>
<exclude-pattern>classes/models/FrmEntry.php</exclude-pattern>
<exclude-pattern>classes/models/FrmEntryMeta.php</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<!-- wpmuBaseTablePrefix breaks this rule -->
<exclude-pattern>classes/models/FrmField.php</exclude-pattern>
<exclude-pattern>classes/models/FrmForm.php</exclude-pattern>
<exclude-pattern>classes/models/FrmDb.php</exclude-pattern>
</rule>
</ruleset>