-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
120 lines (102 loc) · 3.99 KB
/
Copy pathphpcs.xml
File metadata and controls
120 lines (102 loc) · 3.99 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Starisian Plugin Standard"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd">
<description>
Starisian Technologies strict coding standard.
Combines WordPress VIP, PHPCompatibility, Modern PHP (PHPCSExtra), and VariableAnalysis rules.
JS/CSS scanning is disabled to avoid PHP_CodeSniffer 4.0 deprecation warnings.
</description>
<!-- Scan all PHP source files -->
<file>starmus-audio-recorder.php</file>
<file>uninstall.php</file>
<file>src/</file>
<!-- Exclude paths that should not be scanned -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>wp-assets/*</exclude-pattern>
<exclude-pattern>build/*</exclude-pattern>
<!-- configs -->
<config name="testVersion" value="8.2-8.4"/>
<config name="tabWidth" value="4"/>
<config name="default_standard" value="."/>
<!-- PHPCS runtime options -->
<arg value="sp"/> <!-- Show sniff codes + progress -->
<arg name="basepath" value="./"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/>
<arg name="ignore-annotations"/>
<arg name="encoding" value="utf-8"/>
<arg name="warning-severity" value="0"/>
<arg name="cache" value="true"/>
<arg name="cache-file" value=".phpcs.cache"/>
<arg name="report" value="full"/>
<arg name="report-file" value="phpcs-report.txt"/>
<arg name="standard" value="."/>
<!-- PHP Compatibility -->
<rule ref="PHPCompatibilityWP"/>
<!-- Core WordPress rules -->
<config name="minimum_supported_wp_version" value="6.8"/>
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPressVIPMinimum"/>
<rule ref="WordPress.Security"/>
<rule ref="WordPress.DB"/>
<rule ref="WordPress.XSS"/>
<!-- Modern PHP / PHPCSExtra rules -->
<rule ref="Modernize"/>
<rule ref="Universal"/>
<rule ref="PHPCSExtra.CodeAnalysis.EmptyStatement"/>
<rule ref="PHPCSExtra.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="PHPCSExtra.CodeAnalysis.AssignmentInCondition"/>
<rule ref="PHPCSExtra.CodeAnalysis.StaticThis"/>
<rule ref="PHPCSExtra.CodeAnalysis.ShortTernary"/>
<!-- Unused code analysis -->
<rule ref="PHPCSExtra.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="PHPCSExtra.CodeAnalysis.UnusedPrivateMethod"/>
<rule ref="PHPCSExtra.CodeAnalysis.UnusedVariable"/>
<!-- Variable Analysis -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis"/>
<!-- Naming conventions -->
<rule ref="WordPress.NamingConventions.ValidFunctionName"/>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="sparxstar"/>
<element value="starmus"/>
<element value="aiwa"/>
<element value="aiwacs"/>
<element value="starisian"/>
</property>
</properties>
</rule>
<!-- i18n checks -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="starmus-audio-recorder"/>
</property>
</properties>
</rule>
<!-- Relax spacing rules slightly -->
<rule ref="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore">
<severity>0</severity>
</rule>
<rule ref="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter">
<severity>0</severity>
</rule>
<!-- Optional: Disable JS/CSS sniff listeners entirely -->
<exclude name="WordPressVIPMinimum.JS.*"/>
<!-- Force spaces over tabs -->
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="false"/>
</properties>
</rule>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
</ruleset>