source: spip-zone/_dev_/univers_spip/phpcs.xml.dist @ 112586

Last change on this file since 112586 was 112585, checked in by james@…, 2 years ago

code mort et coding standards

File size: 1.9 KB
Line 
1<?xml version="1.0"?>
2<ruleset name="SPIP">
3    <description>Coding rules for SPIP</description>
4
5    <file>./</file>
6    <exclude-pattern>geoip/*</exclude-pattern>
7    <exclude-pattern>javascript/*</exclude-pattern>
8    <exclude-pattern>css/*</exclude-pattern>
9
10    <!-- Appliquer PSR-2 moins nos exceptions -->
11    <rule ref="PSR2" >
12        <!-- Désactiver la vérification sur les noms de classes/fonctions -->
13        <exclude name="Squiz.Classes.ValidClassName" />
14        <!-- Désactiver la vérification sur l'indentation -->
15        <exclude name="Generic.WhiteSpace.ScopeIndent" />
16        <exclude name="Generic.WhiteSpace.DisallowTabIndent" />
17        <!-- Désactiver la vérification sur les accolades -->
18        <exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
19        <exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
20        <exclude name="PSR2.Classes.PropertyDeclaration" />
21    </rule>
22
23    <!-- Tabulations pour l'indentation -->
24    <arg name="tab-width" value="4"/>
25    <rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
26    <rule ref="Generic.WhiteSpace.ScopeIndent">
27        <properties>
28            <property name="indent" value="4"/>
29            <property name="tabIndent" value="true"/>
30        </properties>
31    </rule>
32
33    <!-- Accolades -->
34    <rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
35    <rule ref="Generic.ControlStructures.InlineControlStructure" />
36    <rule ref="Squiz.ControlStructures.ControlSignature" />
37    <rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
38        <severity>0</severity>
39    </rule>
40
41    <!-- Guillemets doubles -->
42    <rule ref="Squiz.Strings.DoubleQuoteUsage"/>
43    <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
44        <severity>0</severity>
45    </rule>
46   
47    <!-- Constantes en majuscules -->
48    <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
49
50</ruleset>
Note: See TracBrowser for help on using the repository browser.