forked from valkey-io/valkey-glide-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
52 lines (44 loc) · 1.86 KB
/
phpcs.xml
File metadata and controls
52 lines (44 loc) · 1.86 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
<?xml version="1.0"?>
<ruleset name="ValkeyGlide">
<description>PHP CodeSniffer configuration for Valkey GLIDE PHP</description>
<!-- Check all PHP files. -->
<file>./</file>
<arg name="extensions" value="php"/>
<!-- Exclude vendor, build, and example files. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<exclude-pattern>*/examples/*</exclude-pattern>
<!-- Exclude auto-generated test runner file -->
<exclude-pattern>run-tests.php</exclude-pattern>
<!-- Exclude test files generated by 'protoc'. See DEVELOPER.md for details. -->
<exclude-pattern>tests/Connection_request/*</exclude-pattern>
<exclude-pattern>tests/GPBMetadata/*</exclude-pattern>
<!-- Use PSR-12 standard -->
<rule ref="PSR12"/>
<!-- Additional rules -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- Customize line length -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="200"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
<!-- Relax some rules for tests and stubs -->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>*.stub.php</exclude-pattern>
</rule>
<rule ref="Generic.PHP.RequireStrictTypes">
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>*.stub.php</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration">
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>*.stub.php</exclude-pattern>
</rule>
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>*.stub.php</exclude-pattern>
</rule>
</ruleset>