107 lines
3.2 KiB
XML
107 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
<rulset name="CoJedzie">
|
|
<description>Co Jedzie ruleset</description>
|
|
|
|
<arg name="colors"/>
|
|
<arg name="parallel" value="75"/>
|
|
|
|
<rule ref="Internal.Tokenizer.Exception">
|
|
<type>error</type>
|
|
</rule>
|
|
|
|
<!-- PSR 2 -->
|
|
<rule ref="PSR2">
|
|
<exclude name="PSR2.Namespaces"/>
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
|
|
<exclude name="PSR2.Classes.MethodDeclaration.Underscore"/>
|
|
</rule>
|
|
|
|
<!-- No More Than 2 lines -->
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
|
<properties>
|
|
<property name="ignoreBlankLines" value="false"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
|
|
<severity>10</severity>
|
|
</rule>
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
|
|
<severity>10</severity>
|
|
</rule>
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
|
|
<severity>5</severity>
|
|
</rule>
|
|
|
|
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
|
|
<properties>
|
|
<property name="ignoreNewlines" value="true"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- Make this sniff more sensitive to commented out code blocks. -->
|
|
<rule ref="Squiz.PHP.CommentedOutCode">
|
|
<properties>
|
|
<property name="maxPercentage" value="60"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- Line length -->
|
|
<rule ref="Generic.Files.LineLength">
|
|
<properties>
|
|
<property name="lineLimit" value="120"/>
|
|
<property name="absoluteLineLimit" value="180"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- Linus rule -->
|
|
<rule ref="Generic.Metrics.NestingLevel">
|
|
<properties>
|
|
<property name="nestingLevel" value="3"/>
|
|
<property name="absoluteNestingLevel" value="6"/>
|
|
</properties>
|
|
<severity>50</severity>
|
|
</rule>
|
|
|
|
<rule ref="Generic.Strings.UnnecessaryStringConcat">
|
|
<properties>
|
|
<property name="allowMultiline" value="true"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<rule ref="Squiz.Arrays.ArrayDeclaration">
|
|
<exclude name="Squiz.Arrays.ArrayDeclaration.KeyNotAligned"/>
|
|
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned"/>
|
|
<exclude name="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned"/>
|
|
<exclude name="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed"/>
|
|
</rule>
|
|
|
|
<rule ref="Generic.Arrays.ArrayIndent"/>
|
|
|
|
<rule ref="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed">
|
|
<severity>0</severity>
|
|
</rule>
|
|
|
|
<rule ref="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed">
|
|
<severity>1</severity>
|
|
</rule>
|
|
|
|
<!-- Ban some functions -->
|
|
<rule ref="Generic.PHP.ForbiddenFunctions">
|
|
<properties>
|
|
<property name="forbiddenFunctions" type="array">
|
|
<element key="sizeof" value="count"/>
|
|
<element key="delete" value="unset"/>
|
|
<element key="print" value="echo"/>
|
|
<element key="is_null" value="null"/>
|
|
<element key="create_function" value="null"/>
|
|
</property>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- a feee -->
|
|
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
|
</rulset>
|