mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Better ruleset
This commit is contained in:
parent
955d83be8b
commit
c24d5c8376
41
ruleset.xml
41
ruleset.xml
@ -1,16 +1,49 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="HumHub">
|
||||
<description>HumHub coding standard.</description>
|
||||
<description>HumHub coding standards</description>
|
||||
|
||||
<!-- Include PSR-1 -->
|
||||
<rule ref="PSR1"/>
|
||||
|
||||
<rule ref="PSR2">
|
||||
<!-- Opening parenthesis of a multi-line function call must be the last content on the line. -->
|
||||
<!-- Closing parenthesis of a multi-line function call must be on a line by itself. -->
|
||||
<!-- Only one argument is allowed per line in a multi-line function call. -->
|
||||
<exclude name="PEAR.Functions.FunctionCallSignature"/>
|
||||
|
||||
<!-- Include PSR-2 -->
|
||||
<rule ref="PSR2"/>
|
||||
<!-- We don't have line length (line width) limits. -->
|
||||
<exclude name="Generic.Files.LineLength"/>
|
||||
|
||||
<!-- CASE keyword must be indented 4 spaces from SWITCH keyword. -->
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration"/>
|
||||
</rule>
|
||||
|
||||
<!-- Prefer [] instead array() -->
|
||||
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
|
||||
<type>warning</type>
|
||||
</rule>
|
||||
|
||||
<!-- If string doesn't contain variables or single quotes, use single quotes. -->
|
||||
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
|
||||
<!-- Not check variable substitution -->
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- Ignore for migrations. -->
|
||||
<!-- Ignore missing namespace for migrations -->
|
||||
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
|
||||
<exclude-pattern>m\d{6}_\d{6}_.+\.php$</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<!-- Ignore camel caps format for class name of migrations -->
|
||||
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
|
||||
<exclude-pattern>m\d{6}_\d{6}_.+\.php$</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<!-- Ignore for tests. -->
|
||||
<!-- Ignore method name prefixed with underscore to indicate visibility -->
|
||||
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
|
||||
<exclude-pattern>tests?/*(Cest|Test).php$</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
||||
|
Loading…
x
Reference in New Issue
Block a user