-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
40 lines (33 loc) · 1.28 KB
/
Copy pathphpcs.xml
File metadata and controls
40 lines (33 loc) · 1.28 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
<?xml version="1.0"?>
<ruleset name="Magento2-Module">
<description>Optimized Magento 2.4+ module ruleset for PHPCS.</description>
<!-- Exclude generated or non-module directories -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>generated/*</exclude-pattern>
<exclude-pattern>pub/static/*</exclude-pattern>
<exclude-pattern>app/etc/*</exclude-pattern>
<exclude-pattern>*/docs/*</exclude-pattern>
<exclude-pattern>*.sh</exclude-pattern>
<!-- Base Magento standard -->
<rule ref="Magento2">
<!-- Silence deprecated LESS/CSS warnings -->
<exclude name="Magento2.Less.BracesFormatting"/>
<exclude name="Magento2.Less.Indentation"/>
</rule>
<!-- Disable LESS class naming globally if needed -->
<rule ref="Magento2.Less.ClassNaming">
<severity>0</severity>
</rule>
<!-- Disable GraphQL sniffs if your module doesn't use it -->
<rule ref="Magento2.GraphQL">
<severity>0</severity>
</rule>
<!-- PSR12 coding standard -->
<rule ref="PSR12"/>
<!-- PHPCompatibility for a specific PHP version -->
<rule ref="PHPCompatibility">
<arg name="testVersion" value="8.2-"/>
</rule>
<!-- Limit to PHP files -->
<arg name="extensions" value="php,phtml"/>
</ruleset>