2012-09-26 23:35:17 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<ruleset name="SilverStripe">
|
|
|
|
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
|
2016-11-28 06:44:19 +01:00
|
|
|
|
|
|
|
<!-- 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>
|
2020-04-02 13:09:22 +02:00
|
|
|
<rule ref="Squiz.Strings.ConcatenationSpacing">
|
2018-01-10 17:55:11 +01:00
|
|
|
<properties>
|
|
|
|
<property name="spacing" value="1" />
|
|
|
|
<property name="ignoreNewlines" value="true"/>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2016-11-28 06:44:19 +01:00
|
|
|
|
2020-04-20 19:51:13 +02:00
|
|
|
<!-- use short array syntax (less thirdparty) -->
|
|
|
|
<rule ref="Generic.Arrays.DisallowLongArraySyntax">
|
|
|
|
<exclude-pattern>/thirdparty/*</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2017-08-31 08:17:58 +02:00
|
|
|
<!-- include php files only -->
|
2018-01-10 17:55:11 +01:00
|
|
|
<arg name="extensions" value="php,lib,inc,php5"/>
|
2017-08-31 08:17:58 +02:00
|
|
|
|
2012-09-26 23:35:17 +02:00
|
|
|
<!-- PHP-PEG generated file not intended for human consumption -->
|
|
|
|
<exclude-pattern>*/SSTemplateParser.php$</exclude-pattern>
|
2018-01-10 17:55:11 +01:00
|
|
|
<exclude-pattern>*/_fakewebroot/*</exclude-pattern>
|
|
|
|
<exclude-pattern>*/fixtures/*</exclude-pattern>
|
2012-09-26 23:35:17 +02:00
|
|
|
</ruleset>
|
|
|
|
|