Skip to content

Instantly share code, notes, and snippets.

@magikcypress magikcypress/phpcs.xml
Last active Jan 23, 2017

Embed
What would you like to do?
Coding rules for SPIP with Sublime text
<?xml version="1.0"?>
<ruleset name="SPIP">
<!--
Liens utiles
documentation : http://contrib.spip.net/style-code-php
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
https://github.com/ucfcdl/fuelphp-phpcs/tree/master/Standards/FuelPHP
https://github.com/vanilla/addons/tree/master/standards/Vanilla
-->
<description>Coding rules for SPIP with Sublime text</description>
<exclude-pattern>config/*</exclude-pattern>
<exclude-pattern>IMG/*</exclude-pattern>
<exclude-pattern>lib/*</exclude-pattern>
<exclude-pattern>local/*</exclude-pattern>
<exclude-pattern>plugins-dist/*</exclude-pattern>
<exclude-pattern>squelettes/*</exclude-pattern>
<exclude-pattern>tmp/*</exclude-pattern>
<!-- Appliquer PSR-2 moins nos exceptions -->
<rule ref="PSR2" >
<!-- Désactiver la vérification sur les noms de classes/fonctions -->
<exclude name="Squiz.Classes.ValidClassName" />
<!-- Désactiver la vérification sur l'indentation -->
<exclude name="Generic.WhiteSpace.ScopeIndent" />
<exclude name="Generic.WhiteSpace.DisallowTabIndent" />
<!-- Désactiver les camel caps sur les fonctions -->
<exclude name="Generic.NamingConventions.CamelCapsFunctionName" />
<!-- Désactiver la vérification sur les accolades -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
<exclude name="PSR2.Classes.PropertyDeclaration" />
</rule>
<!-- Tabulations pour l'indentation -->
<arg name="tab-width" value="4"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
</rule>
<!-- Accolades -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
<rule ref="Generic.ControlStructures.InlineControlStructure" />
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
<severity>0</severity>
</rule>
<!-- Guillemets doubles -->
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
<severity>0</severity>
</rule>
<!-- Constantes en majuscules -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.