2013-11-23 21:01:26 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<ruleset name="phpseclib Standard">
|
|
|
|
|
|
|
|
<description>phpseclib coding standard</description>
|
|
|
|
|
2013-12-01 03:30:43 +01:00
|
|
|
<!-- We are using the PEAR standard as a base -->
|
2014-02-15 19:16:21 +01:00
|
|
|
<rule ref="PEAR">
|
|
|
|
<!-- Temporary exceptions to the PEAR standard follow -->
|
|
|
|
<exclude name="Generic.ControlStructures.InlineControlStructure.Discouraged" />
|
|
|
|
<exclude name="Generic.Files.LineLength.TooLong" />
|
|
|
|
<exclude name="PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital" />
|
|
|
|
<exclude name="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps" />
|
|
|
|
<exclude name="PEAR.Commenting.ClassComment.InvalidVersion" />
|
|
|
|
<exclude name="PEAR.Commenting.ClassComment.MissingTag" />
|
|
|
|
<exclude name="PEAR.Commenting.FileComment.EmptyCopyright" />
|
|
|
|
<exclude name="PEAR.Commenting.FileComment.InvalidVersion" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.ExtraParamComment" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.MissingReturn" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.MissingParamComment" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.MissingParamName" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.MissingParamTag" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.ParameterCommentsNotAligned" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.ParameterNamesNotAligned" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.ParamNameNoMatch" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.SpacingAfterParams" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeParams" />
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeTags" />
|
|
|
|
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
|
|
|
|
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
|
|
|
|
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
|
|
|
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.BreakIdent" />
|
|
|
|
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.Indent" />
|
|
|
|
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.Line" />
|
|
|
|
<exclude name="PEAR.WhiteSpace.ScopeIndent.Incorrect" />
|
|
|
|
</rule>
|
2013-12-01 03:30:43 +01:00
|
|
|
|
|
|
|
<!-- Useful additional rules follow -->
|
|
|
|
|
2013-11-23 21:01:26 +01:00
|
|
|
<!-- "for (; bar; )" should be "while (bar)" instead -->
|
|
|
|
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
|
|
|
|
|
|
|
|
<!-- A method MUST not only call its parent -->
|
|
|
|
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
|
|
|
|
|
|
|
|
<!-- All code files MUST use only UTF-8 without BOM. -->
|
|
|
|
<rule ref="Generic.Files.ByteOrderMark" />
|
|
|
|
|
2014-02-10 14:51:35 +01:00
|
|
|
<!-- Each file MUST end with exactly one newline character -->
|
|
|
|
<rule ref="PSR2.Files.EndFileNewline" />
|
|
|
|
|
2013-11-23 21:01:26 +01:00
|
|
|
<!-- In the argument list, there MUST NOT be a space before each comma,
|
|
|
|
and there MUST be one space after each comma. -->
|
|
|
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="equalsSpacing" value="1"/>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
|
|
|
|
|
2013-12-26 00:33:08 +01:00
|
|
|
<!-- There MUST NOT be trailing whitespace at the end of lines. -->
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
|
|
|
|
|
|
|
<!-- There MUST NOT be whitespace before the first content of a file -->
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
|
|
|
|
|
|
|
|
<!-- There MUST NOT be whitespace after the last content of a file -->
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
|
|
|
|
|
|
|
|
<!-- Functions MUST NOT contain multiple empty lines in a row -->
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
|
|
|
|
|
2013-11-23 21:01:26 +01:00
|
|
|
<!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
|
|
|
|
<rule ref="Zend.Files.ClosingTag" />
|
|
|
|
|
|
|
|
</ruleset>
|