mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-30 22:37:42 +02:00
45 lines
1.7 KiB
XML
45 lines
1.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ruleset name="SilverStripe">
|
|
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
|
|
|
|
<file>src</file>
|
|
<file>tests</file>
|
|
|
|
<!-- base rules are PSR-2 -->
|
|
<rule ref="PSR2" >
|
|
<!-- Current exclusions -->
|
|
<exclude name="PSR1.Methods.CamelCapsMethodName" />
|
|
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
|
|
<exclude name="PSR2.Classes.PropertyDeclaration" />
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration" /> <!-- causes php notice while linting -->
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" />
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault" />
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
|
|
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
|
|
<exclude name="Squiz.Scope.MethodScope" />
|
|
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
|
|
<exclude name="Generic.Files.LineLength.TooLong" />
|
|
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" />
|
|
</rule>
|
|
<rule ref="Squiz.Strings.ConcatenationSpacing">
|
|
<properties>
|
|
<property name="spacing" value="1" />
|
|
<property name="ignoreNewlines" value="true"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- use short array syntax (less thirdparty) -->
|
|
<rule ref="Generic.Arrays.DisallowLongArraySyntax">
|
|
<exclude-pattern>/thirdparty/*</exclude-pattern>
|
|
</rule>
|
|
|
|
<!-- include php files only -->
|
|
<arg name="extensions" value="php,lib,inc,php5"/>
|
|
|
|
<!-- PHP-PEG generated file not intended for human consumption -->
|
|
<exclude-pattern>*/SSTemplateParser.php$</exclude-pattern>
|
|
<exclude-pattern>*/_fakewebroot/*</exclude-pattern>
|
|
<exclude-pattern>*/fixtures/*</exclude-pattern>
|
|
</ruleset>
|
|
|