mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-26 20:24:39 +01:00
d9e9504fba
* PSR2-1.0: Fix indentation phpcbf did not fix. Remove PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket exception. Use phpcbf to fix PHP code to ruleset. Ignore coding guidelines in ANSI switch block. Base code sniffer ruleset on PSR2 rather than PEAR. Update PHP Code Sniffer to 2.3.3 Conflicts: build/code-sniffer-ruleset-tests.xml build/code-sniffer-ruleset.xml composer.lock phpseclib/Crypt/DES.php phpseclib/Crypt/Hash.php phpseclib/Crypt/RSA.php phpseclib/File/X509.php phpseclib/Math/BigInteger.php phpseclib/Net/SFTP.php phpseclib/Net/SSH1.php phpseclib/Net/SSH2.php tests/Functional/Net/SFTPUserStoryTest.php tests/Unit/Crypt/TwofishTest.php
36 lines
1.3 KiB
XML
36 lines
1.3 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="phpseclib Standard">
|
|
|
|
<description>phpseclib coding standard</description>
|
|
|
|
<!-- We are using the PSR2 standard as a base -->
|
|
<rule ref="PSR2">
|
|
<!-- Exceptions due to legacy code with PHP4 compatibility -->
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing" />
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed" />
|
|
<exclude name="Squiz.Scope.MethodScope.Missing" />
|
|
|
|
<!-- Exceptions for backward compatibility -->
|
|
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
|
|
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
|
|
|
|
<!-- Exceptions for whitespacing -->
|
|
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE" />
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonDEFAULT" />
|
|
|
|
<!-- Other Exceptions -->
|
|
<exclude name="Generic.Files.LineLength.TooLong" />
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
|
|
</rule>
|
|
|
|
<!-- Useful additional rules follow -->
|
|
|
|
<!-- "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" />
|
|
|
|
</ruleset>
|