1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-23 18:29:15 +03:00
Files
phpmyadmin/phpcs.xml.dist
Maurício Meneghini Fauth a029f29457 Update phpmyadmin/coding-standard
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.com.br>
2026-07-28 16:53:23 -03:00

116 lines
5.3 KiB
XML

<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<!-- Show progress and sniff codes -->
<arg value="ps"/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<!-- Make sniff report relative -->
<arg name="basepath" value="."/>
<file>config.sample.inc.php</file>
<file>examples</file>
<file>index.php</file>
<file>js/messages.php</file>
<file>libraries</file>
<file>scripts</file>
<file>setup</file>
<file>show_config_errors.php</file>
<file>test</file>
<file>url.php</file>
<exclude-pattern>libraries/cache/*</exclude-pattern>
<exclude-pattern>libraries/language_stats.inc.php</exclude-pattern>
<exclude-pattern>test/doctum-config.php</exclude-pattern>
<rule ref="PhpMyAdmin"/>
<rule ref="SlevomatCodingStandard.Classes.DisallowStringExpressionPropertyFetch.DisallowedStringExpressionPropertyFetch">
<exclude-pattern>libraries/classes/Plugins/Import/ImportOds.php</exclude-pattern>
<exclude-pattern>libraries/classes/Plugins/Import/ImportXml.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat">
<exclude-pattern>libraries/classes/Plugins/Export/ExportSql.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit.UselessElse">
<exclude-pattern>libraries/classes/Controllers/Import/ImportController.php</exclude-pattern>
<exclude-pattern>libraries/classes/Controllers/Preferences/ManageController.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName">
<exclude-pattern>libraries/services.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.PHP.RequireNowdoc.RequiredNowdoc">
<exclude-pattern>libraries/classes/OpenDocument.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation">
<exclude-pattern>libraries/classes/Controllers/Server/ShowEngineController.php</exclude-pattern>
<exclude-pattern>libraries/classes/Plugins/Export/Helpers/Pdf.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces.DuplicateSpaces">
<exclude-pattern>libraries/classes/Controllers/HomeController.php</exclude-pattern>
<exclude-pattern>test/classes/Stubs/DbiDummy.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>libraries/classes/Plugins/Transformations/*</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.GlobalKeyword">
<exclude-pattern>libraries/classes/*</exclude-pattern>
<exclude-pattern>test/*</exclude-pattern>
<exclude-pattern>index.php</exclude-pattern>
<exclude-pattern>js/messages.php</exclude-pattern>
<exclude-pattern>setup/index.php</exclude-pattern>
</rule>
<!-- Rules that should be followed, but are not required -->
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing.IncorrectCountOfBlankLinesAfterConstant">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ParentCallSpacing.IncorrectLinesCountAfterControlStructure">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ParentCallSpacing.IncorrectLinesCountBeforeControlStructure">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Classes.PropertySpacing.IncorrectCountOfBlankLinesAfterProperty">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment.UselessDocComment">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireSingleLineCondition.RequiredSingleLineCondition">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Functions.RequireSingleLineCall.RequiredSingleLineCall">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation">
<severity>4</severity>
</rule>
<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps">
<severity>4</severity>
</rule>
</ruleset>