mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 22:27:24 +02:00
140 lines
6.1 KiB
XML
140 lines
6.1 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="Adminer Coding Standard">
|
|
<description>The coding standard for Adminer.</description>
|
|
<arg value="s"/>
|
|
<arg name="parallel" value="8"/>
|
|
|
|
<file>.</file>
|
|
<exclude-pattern>/externals/</exclude-pattern>
|
|
<exclude-pattern>/designs/</exclude-pattern>
|
|
<exclude-pattern>/(adminer|editor)[-.]</exclude-pattern>
|
|
|
|
<rule ref="PSR12">
|
|
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/><!-- Replaced by: Generic.WhiteSpace.DisallowSpaceIndent -->
|
|
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
|
|
<exclude name="PSR1.Classes.ClassDeclaration.MultipleClasses"/>
|
|
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine"/><!-- Replaced by: Generic.Classes.OpeningBraceSameLine -->
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
|
|
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
|
|
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/><!-- Replaced by: Generic.Functions.OpeningFunctionBraceKernighanRitchie -->
|
|
<exclude name="PSR12.Properties.ConstantVisibility.NotFound"/><!-- PHP 7.1 is not required. -->
|
|
|
|
<!-- More readable. -->
|
|
<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
|
|
<exclude name="PSR12.Classes.OpeningBraceSpace.Found"/>
|
|
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore"/>
|
|
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter"/>
|
|
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
|
|
|
|
<!-- Saves bytes. -->
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.Multiple"/>
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing"/>
|
|
<exclude name="PSR12.Classes.ClassInstantiation.MissingParentheses"/>
|
|
<exclude name="Squiz.Scope.MethodScope.Missing"/>
|
|
|
|
<!-- False positives. -->
|
|
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
|
|
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
|
|
</rule>
|
|
|
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
|
<properties>
|
|
<property name="ignoreIndentationTokens" type="array">
|
|
<element value="T_OPEN_TAG"/>
|
|
</property>
|
|
</properties>
|
|
</rule>
|
|
|
|
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
|
|
<exclude-pattern>adminer/drivers/</exclude-pattern>
|
|
<exclude-pattern>adminer/include/db.inc.php</exclude-pattern>
|
|
<exclude-pattern>adminer/include/pdo.inc.php</exclude-pattern>
|
|
<exclude-pattern>adminer/plugins/foreign-system.php</exclude-pattern>
|
|
<exclude-pattern>adminer/plugins/drivers/</exclude-pattern>
|
|
</rule>
|
|
|
|
<rule ref="Generic.Files.LineLength">
|
|
<properties>
|
|
<property name="lineLimit" value="250"/>
|
|
</properties>
|
|
<exclude-pattern>adminer/lang/</exclude-pattern>
|
|
<exclude-pattern>plugins/foreign-system.php</exclude-pattern>
|
|
</rule>
|
|
|
|
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
|
|
<exclude-pattern>plugins/[^/]+\.php</exclude-pattern>
|
|
<exclude-pattern>editor/(example|sqlite)\.php</exclude-pattern>
|
|
</rule>
|
|
|
|
<rule ref="Generic.Arrays.DisallowShortArraySyntax"/>
|
|
<rule ref="Generic.Classes.OpeningBraceSameLine"/>
|
|
<rule ref="Generic.CodeAnalysis.EmptyPHPStatement"/>
|
|
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
|
|
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
|
|
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
|
|
<rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence"/>
|
|
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
|
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
|
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
|
<rule ref="Generic.Files.EndFileNewline"/>
|
|
<rule ref="Generic.Files.LowercasedFilename"/>
|
|
<rule ref="Generic.Formatting.SpaceAfterCast"/>
|
|
<rule ref="Generic.Functions.CallTimePassByReference"/>
|
|
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
|
|
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
|
<rule ref="Generic.PHP.BacktickOperator"/>
|
|
<rule ref="Generic.PHP.DisallowRequestSuperglobal"/>
|
|
<rule ref="Generic.PHP.ForbiddenFunctions"/>
|
|
<rule ref="Generic.Strings.UnnecessaryHeredoc"/>
|
|
<rule ref="Generic.VersionControl.GitMergeConflict"/>
|
|
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
|
|
<rule ref="Generic.WhiteSpace.LanguageConstructSpacing"/>
|
|
|
|
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
|
|
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>
|
|
<rule ref="Squiz.Classes.SelfMemberReference"/>
|
|
<rule ref="Squiz.CSS.ClassDefinitionNameSpacing"/>
|
|
<rule ref="Squiz.CSS.ColonSpacing"/>
|
|
<rule ref="Squiz.CSS.DuplicateClassDefinition"/>
|
|
<rule ref="Squiz.CSS.DuplicateStyleDefinition"/>
|
|
<rule ref="Squiz.CSS.EmptyClassDefinition"/>
|
|
<rule ref="Squiz.CSS.EmptyStyleDefinition"/>
|
|
<rule ref="Squiz.CSS.ForbiddenStyles"/>
|
|
<rule ref="Squiz.CSS.Indentation"/>
|
|
<rule ref="Squiz.CSS.MissingColon"/>
|
|
<rule ref="Squiz.CSS.Opacity"/>
|
|
<rule ref="Squiz.CSS.SemicolonSpacing"/>
|
|
<rule ref="Squiz.Functions.FunctionDuplicateArgument"/>
|
|
<rule ref="Squiz.Objects.ObjectMemberComma"/>
|
|
<rule ref="Squiz.Operators.IncrementDecrementUsage"/>
|
|
<rule ref="Squiz.Operators.ValidLogicalOperators"/>
|
|
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
|
|
<rule ref="Squiz.PHP.Eval"/>
|
|
<rule ref="Squiz.PHP.Heredoc"/>
|
|
<rule ref="Squiz.PHP.InnerFunctions"/>
|
|
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
|
|
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
|
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
|
<rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace"/>
|
|
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
|
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"/>
|
|
|
|
<!--
|
|
This is slow and has false positives but it's useful occasionally.
|
|
https://github.com/PHPCompatibility/PHPCompatibility
|
|
<rule ref="PHPCompatibility"/>
|
|
<config name="testVersion" value="5.3-"/>
|
|
<rule ref="PHPCompatibility.Extensions.RemovedExtensions">
|
|
<exclude name="PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved"/>
|
|
<exclude name="PHPCompatibility.Extensions.RemovedExtensions.ibaseRemoved"/>
|
|
</rule>
|
|
<rule ref="PHPCompatibility.Constants.RemovedConstants">
|
|
<exclude-pattern>adminer/plugins/drivers/firebird.php</exclude-pattern>
|
|
</rule>
|
|
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions">
|
|
<exclude-pattern>adminer/plugins/drivers/firebird.php</exclude-pattern>
|
|
</rule>
|
|
-->
|
|
</ruleset>
|