mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-10 19:28:41 +00:00
166 lines
6.8 KiB
XML
Executable File
166 lines
6.8 KiB
XML
Executable File
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ruleset name="default">
|
|
<description></description>
|
|
<exclude-pattern>*.tpl.php</exclude-pattern>
|
|
<exclude-pattern>*.css</exclude-pattern>
|
|
<exclude-pattern>*Routes.php</exclude-pattern>
|
|
<exclude-pattern>*Hooks.php</exclude-pattern>
|
|
<exclude-pattern>*ObjLoader.js</exclude-pattern>
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
<exclude-pattern>*/Demo/*</exclude-pattern>
|
|
<exclude-pattern>*/Build/*</exclude-pattern>
|
|
<exclude-pattern>*/Cache/*</exclude-pattern>
|
|
<exclude-pattern>*/Docs/*</exclude-pattern>
|
|
<exclude-pattern>*/Documentation/*</exclude-pattern>
|
|
<exclude-pattern>*/Resources/*</exclude-pattern>
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
<exclude-pattern>*/Routes/*</exclude-pattern>
|
|
<exclude-pattern>*/Hooks/*</exclude-pattern>
|
|
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
|
<arg value="q"/>
|
|
<arg name="colors"/>
|
|
<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.PHP.DeprecatedFunctions"/>
|
|
<rule ref="Generic.PHP.DisallowAlternativePHPTags"/>
|
|
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
|
<rule ref="Generic.PHP.DiscourageGoto"/>
|
|
<!--<rule ref="Generic.PHP.ForbiddenFunctions">
|
|
<properties>
|
|
<property name="forbiddenFunctions" type="array" value="delete=>unset,print=>echo,create_function=>null" />
|
|
</properties>
|
|
</rule>-->
|
|
<rule ref="Generic.Files.ByteOrderMark"/>
|
|
<rule ref="Generic.Files.LineLength">
|
|
<rule ref="Generic.Files.OneTraitPerFile"/>
|
|
<rule ref="Generic.Files.OneInterfacePerFile"/>
|
|
<rule ref="Generic.Files.OneClassPerFile"/>
|
|
<rule ref="Generic.Files.OneObjectStructurePerFile"/>
|
|
<rule ref="Generic.Files.LineEndings">
|
|
<properties>
|
|
<property name="eolChar" value="\n"/>
|
|
</properties>
|
|
</rule>
|
|
<rule ref="Generic.Debug.ESLint"/>
|
|
<rule ref="Generic.Debug.CSSLint"/>
|
|
<rule ref="Generic.Debug.JSHint"/>
|
|
<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.Metrics.CyclomaticComplexity">
|
|
<properties>
|
|
<property name="complexity" value="15"/>
|
|
<property name="absoluteComplexity" value="25"/>
|
|
</properties>
|
|
<exclude-pattern>*Measurement.php</exclude-pattern>
|
|
</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="Generic.CodeAnalysis.UnusedFunctionParameter">
|
|
<severity>3</severity>
|
|
</rule>
|
|
<rule ref="PEAR.Classes.ClassDeclaration"/>
|
|
<rule ref="PEAR.Commenting.FunctionComment">
|
|
<severity>3</severity>
|
|
<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">
|
|
<severity>3</severity>
|
|
</rule>
|
|
<rule ref="PEAR.Functions.ValidDefaultValue"/>
|
|
<rule ref="PSR1.Files.SideEffects">
|
|
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
|
<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="MySource.Objects.AssignThis"/>
|
|
<rule ref="MySource.PHP.EvalObjectFactory"/>
|
|
<rule ref="MySource.PHP.GetRequestData">
|
|
<exclude-pattern>*Request.php</exclude-pattern>
|
|
</rule>
|
|
<rule ref="Squiz.Classes.DuplicateProperty"/>
|
|
<rule ref="Squiz.CSS.DuplicateStyleDefinition"/>
|
|
<rule ref="Squiz.CSS.EmptyClassDefinition"/>
|
|
<rule ref="Squiz.CSS.EmptyStyleDefinition"/>
|
|
<rule ref="Squiz.CSS.Indentation"/>
|
|
<rule ref="Squiz.CSS.LowercaseStyleDefinition"/>
|
|
<rule ref="Squiz.CSS.MissingColon"/>
|
|
<rule ref="Squiz.CSS.ShorthandSize"/>
|
|
<rule ref="Squiz.Functions.GlobalFunction">
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
</rule>
|
|
<rule ref="Squiz.PHP.GlobalKeyword"/>
|
|
<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> |