mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-11 19:58:41 +00:00
114 lines
5.0 KiB
XML
114 lines
5.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ruleset name="default">
|
|
<description></description>
|
|
<exclude-pattern>*.tpl.php</exclude-pattern>
|
|
<exclude-pattern>*Routes.php</exclude-pattern>
|
|
<exclude-pattern>*ObjLoader.js</exclude-pattern>
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
<exclude-pattern>*/Routes/*</exclude-pattern>
|
|
<arg value="q"/>
|
|
<rule ref="Generic.Classes.DuplicateClassName"/>
|
|
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
|
|
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
|
|
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
|
|
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
|
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
|
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
|
<rule ref="Generic.Commenting.Todo">
|
|
<severity>3</severity>
|
|
</rule>
|
|
<rule ref="Generic.Commenting.Fixme">
|
|
<severity>3</severity>
|
|
</rule>
|
|
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
|
<rule ref="Generic.Files.ByteOrderMark"/>
|
|
<rule ref="Generic.Files.LineEndings"/>
|
|
<rule ref="Generic.Files.LineLength">
|
|
<severity>3</severity>
|
|
<properties>
|
|
<property name="lineLimit" value="150"/>
|
|
<property name="absoluteLineLimit" value="250"/>
|
|
</properties>
|
|
</rule>
|
|
<rule ref="Generic.Formatting.DisallowMultipleStatements">
|
|
<exclude-pattern>*/tests/*</exclude-pattern><!-- inline function definition -->
|
|
</rule>
|
|
<rule ref="Generic.Formatting.MultipleStatementAlignment"/>
|
|
<rule ref="Generic.Formatting.SpaceAfterCast"/>
|
|
<rule ref="Generic.Functions.CallTimePassByReference"/>
|
|
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
|
|
<rule ref="Generic.Metrics.CyclomaticComplexity">
|
|
<properties>
|
|
<property name="complexity" value="15"/>
|
|
<property name="absoluteComplexity" value="25"/>
|
|
</properties>
|
|
<exclude-pattern>*Measurement.php</exclude-pattern><!-- Very simple switch statements -->
|
|
</rule>
|
|
<rule ref="Generic.Metrics.NestingLevel">
|
|
<properties>
|
|
<property name="nestingLevel" value="5"/>
|
|
<property name="absoluteNestingLevel" value="11"/>
|
|
</properties>
|
|
</rule>
|
|
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
|
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
|
|
<rule ref="Generic.NamingConventions.CamelCapsFunctionName">
|
|
<severity>3</severity>
|
|
<exclude-pattern>*StringUtils.php</exclude-pattern><!-- Implements missing default functions -->
|
|
<exclude-pattern>*FinanceFormulas.php</exclude-pattern><!-- Correct name is more important than rule -->
|
|
<exclude-pattern>*StockBonds.php</exclude-pattern><!-- Correct name is more important than rule -->
|
|
<exclude-pattern>*ExponentialSmoothing.php</exclude-pattern><!-- Correct name is more important than rule -->
|
|
</rule>
|
|
<rule ref="Generic.PHP.LowerCaseConstant"/>
|
|
<rule ref="Generic.PHP.NoSilencedErrors"/>
|
|
<rule ref="Generic.Strings.UnnecessaryStringConcat">
|
|
<properties>
|
|
<property name="allowMultiline" value="true" />
|
|
</properties>
|
|
</rule>
|
|
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
|
|
<rule ref="MySource.PHP.EvalObjectFactory"/>
|
|
<rule ref="MySource.PHP.GetRequestData"/>
|
|
<rule ref="PEAR.Classes.ClassDeclaration"/>
|
|
<rule ref="PEAR.Commenting.FunctionComment">
|
|
<exclude-pattern>*/tests/*</exclude-pattern><!-- Tests don't need comments -->
|
|
</rule>
|
|
<rule ref="PEAR.Commenting.InlineComment"/>
|
|
<rule ref="PEAR.ControlStructures.ControlSignature"/>
|
|
<rule ref="PEAR.ControlStructures.MultiLineCondition"/>
|
|
<rule ref="PEAR.Functions.ValidDefaultValue"/>
|
|
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
|
<rule ref="PSR1.Files.SideEffects">
|
|
<severity>3</severity>
|
|
<exclude-pattern>*Pdf.php</exclude-pattern><!-- Just a wrapper -->
|
|
<exclude-pattern>*Excel.php</exclude-pattern><!-- Just a wrapper -->
|
|
<exclude-pattern>*/tests/*</exclude-pattern><!-- Tests don't always have side effects -->
|
|
</rule>
|
|
<rule ref="PSR2.Classes.ClassDeclaration"/>
|
|
<rule ref="PSR2.Classes.PropertyDeclaration"/>
|
|
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
|
|
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
|
|
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
|
|
<rule ref="PSR2.Files.EndFileNewline"/>
|
|
<rule ref="PSR2.Methods.MethodDeclaration"/>
|
|
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
|
|
<rule ref="PSR2.Namespaces.UseDeclaration"/>
|
|
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
|
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
|
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
|
|
<properties>
|
|
<property name="ignoreNewlines" value="true"/>
|
|
</properties>
|
|
</rule>
|
|
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
|
|
<properties>
|
|
<property name="ignoreNewlines" value="true"/>
|
|
</properties>
|
|
<exclude-pattern>*Http.js</exclude-pattern><!-- Regex false positive -->
|
|
</rule>
|
|
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
|
<rule ref="Zend.Files.ClosingTag"/>
|
|
</ruleset> |