mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-05 14:19:27 +00:00
93 lines
3.1 KiB
XML
Executable File
93 lines
3.1 KiB
XML
Executable File
<?xml version="1.0"?>
|
|
<ruleset name="FHComplete">
|
|
<description>FHComplete's coding standard</description>
|
|
|
|
<exclude-pattern>\.git</exclude-pattern>
|
|
<exclude-pattern>*/Config/*.ini.php</exclude-pattern>
|
|
<exclude-pattern>/*/tmp/</exclude-pattern>
|
|
|
|
<rule ref="PSR2">
|
|
<exclude name="PSR1.Classes.ClassDeclaration" />
|
|
<exclude name="PSR1.Methods.CamelCapsMethodName" />
|
|
<exclude name="PSR1.Files.SideEffects" />
|
|
<exclude name="Generic.WhiteSpace.DisallowTabIndent" />
|
|
<exclude name="Squiz.ControlStructures.ControlSignature" />
|
|
<exclude name="Generic.ControlStructures.InlineControlStructure" />
|
|
</rule>
|
|
|
|
<rule ref="Generic.Files.LineLength">
|
|
<properties>
|
|
<property name="lineLimit" value="120"/>
|
|
<property name="absoluteLineLimit" value="150"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!--
|
|
Temporarily ignore until API docblock formatting and line length issues in core code are fixed.
|
|
<rule ref="FHComplete.Commenting.FunctionComment.ParamCommentNotCapital">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="FHComplete.Commenting.FunctionComment.ParamCommentFullStop">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="FHComplete.Commenting.FunctionComment.ThrowsNotCapital">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="FHComplete.Commenting.FunctionComment.ThrowsNoFullStop">
|
|
<severity>0</severity>
|
|
</rule>
|
|
<rule ref="FHComplete.Commenting.FunctionComment.EmptyThrows">
|
|
<severity>0</severity>
|
|
</rule>
|
|
-->
|
|
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
|
|
|
|
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>
|
|
|
|
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
|
|
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
|
|
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
|
|
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
|
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
|
|
|
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
|
|
<rule ref="Generic.Commenting.Todo"/>
|
|
|
|
<!--
|
|
We allow EOL after closing braces
|
|
-->
|
|
<rule ref="FHComplete.ControlStructures.ControlSignature"/>
|
|
|
|
<rule ref="Generic.Files.LineEndings"/>
|
|
|
|
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
|
|
|
|
<rule ref="Squiz.Operators.ValidLogicalOperators"/>
|
|
|
|
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
|
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
|
|
<rule ref="Squiz.PHP.Eval"/>
|
|
<rule ref="Generic.PHP.ForbiddenFunctions"/>
|
|
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
|
<rule ref="Generic.PHP.NoSilencedErrors"/>
|
|
|
|
<rule ref="Squiz.Scope.MemberVarScope"/>
|
|
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
|
|
|
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
|
|
|
|
<!-- Relax some src/* and tests/* rules -->
|
|
<rule ref="Squiz.Classes.ValidClassName">
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
</rule>
|
|
<rule ref="FHComplete.Commenting.FunctionComment">
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
</rule>
|
|
|
|
|
|
<!-- All rules in ./Sniffs are included automatically -->
|
|
</ruleset>
|