Refactor ruleset.xml
Group misplaced excludes, drop dead ones (unloaded PEAR/Zend sniffs), merge MissingParamName severity rule into FunctionComment excludes, normalize formatting. No behavior change.
This commit is contained in:
@@ -22,21 +22,17 @@
|
|||||||
<exclude name="PSR12.Functions.NullableTypeDeclaration.WhitespaceFound"/>
|
<exclude name="PSR12.Functions.NullableTypeDeclaration.WhitespaceFound"/>
|
||||||
<!-- checked by PSR12.ControlStructures.ControlStructureSpacing -->
|
<!-- checked by PSR12.ControlStructures.ControlStructureSpacing -->
|
||||||
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
|
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
|
||||||
<!-- checked by Zend.NamingConventions.ValidVariableName.NotCamelCaps -->
|
<!-- Allow content before closing brace -->
|
||||||
<!-- <exclude name="Squiz.NamingConventions.ValidVariableName.NotCamelCaps"/> -->
|
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
|
||||||
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator"/>
|
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
<!-- All SlevomatCodingStandard sniffs https://github.com/slevomat/coding-standard?tab=readme-ov-file#fixing-errors-automatically -->
|
||||||
<!-- All SlevomatCodingStandard snifs https://github.com/slevomat/coding-standard?tab=readme-ov-file#fixing-errors-automatically -->
|
|
||||||
<rule ref="SlevomatCodingStandard">
|
<rule ref="SlevomatCodingStandard">
|
||||||
<!-- sniffs to exclude -->
|
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys.IncorrectKeyOrder" />
|
<exclude name="SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys.IncorrectKeyOrder" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Attributes.AttributesOrder" />
|
<exclude name="SlevomatCodingStandard.Attributes.AttributesOrder" />
|
||||||
<exclude name="SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment.AttributeBeforeDocComment" />
|
<exclude name="SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment.AttributeBeforeDocComment" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Classes.ClassLength.ClassTooLong" />
|
<exclude name="SlevomatCodingStandard.Classes.ClassLength.ClassTooLong" />
|
||||||
<exclude name="SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion.DisallowedConstructorPropertyPromotion" />
|
<exclude name="SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion.DisallowedConstructorPropertyPromotion" />
|
||||||
<exclude name="SlevomatCodingStandard.Classes.ForbiddenPublicProperty.ForbiddenPublicProperty" />
|
<exclude name="SlevomatCodingStandard.Classes.ForbiddenPublicProperty.ForbiddenPublicProperty" />
|
||||||
@@ -47,16 +43,16 @@
|
|||||||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix" />
|
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix" />
|
||||||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix" />
|
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix" />
|
||||||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix" />
|
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Commenting.DeprecatedAnnotationDeclaration.MissingDescription" />
|
<exclude name="SlevomatCodingStandard.Commenting.DeprecatedAnnotationDeclaration.MissingDescription" />
|
||||||
<exclude name="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode.DisallowedCommentAfterCode" />
|
<exclude name="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode.DisallowedCommentAfterCode" />
|
||||||
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment.OneLinePropertyComment" />
|
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment.OneLinePropertyComment" />
|
||||||
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat" />
|
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat" />
|
||||||
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment" />
|
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment" />
|
||||||
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment" />
|
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh" />
|
<exclude name="SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowNullSafeObjectOperator.DisallowedNullSafeObjectOperator" />
|
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowNullSafeObjectOperator.DisallowedNullSafeObjectOperator" />
|
||||||
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison.DisallowedYodaComparison" />
|
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison.DisallowedYodaComparison" />
|
||||||
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses" />
|
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses" />
|
||||||
@@ -64,7 +60,7 @@
|
|||||||
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithParentheses.MissingParentheses" />
|
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithParentheses.MissingParentheses" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch.DisallowedNonCapturingCatch" />
|
<exclude name="SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch.DisallowedNonCapturingCatch" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Files.FileLength.FileTooLong" />
|
<exclude name="SlevomatCodingStandard.Files.FileLength.FileTooLong" />
|
||||||
<exclude name="SlevomatCodingStandard.Files.LineLength.LineTooLong" />
|
<exclude name="SlevomatCodingStandard.Files.LineLength.LineTooLong" />
|
||||||
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName" />
|
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName" />
|
||||||
@@ -75,9 +71,9 @@
|
|||||||
<exclude name="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength" />
|
<exclude name="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength" />
|
||||||
<exclude name="SlevomatCodingStandard.Functions.RequireArrowFunction.RequiredArrowFunction" />
|
<exclude name="SlevomatCodingStandard.Functions.RequireArrowFunction.RequiredArrowFunction" />
|
||||||
<exclude name="SlevomatCodingStandard.Functions.RequireMultiLineCall.RequiredMultiLineCall" />
|
<exclude name="SlevomatCodingStandard.Functions.RequireMultiLineCall.RequiredMultiLineCall" />
|
||||||
<exclude name="SlevomatCodingStandard.Functions.RequireSingleLineCall.RequiredSingleLineCall" />
|
<exclude name="SlevomatCodingStandard.Functions.RequireSingleLineCall.RequiredSingleLineCall" />
|
||||||
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter" />
|
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName" />
|
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName" />
|
||||||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions.NonFullyQualifiedException" />
|
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions.NonFullyQualifiedException" />
|
||||||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants.NonFullyQualified" />
|
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants.NonFullyQualified" />
|
||||||
@@ -85,27 +81,26 @@
|
|||||||
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName" />
|
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName" />
|
||||||
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces.NonFullyQualified" />
|
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces.NonFullyQualified" />
|
||||||
|
|
||||||
|
<exclude name="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator.DisallowedNumericLiteralSeparator" />
|
||||||
<exclude name="SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator.RequiredNumericLiteralSeparator" />
|
<exclude name="SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator.RequiredNumericLiteralSeparator" />
|
||||||
|
|
||||||
|
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator" />
|
||||||
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPreDecrementOperator" />
|
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPreDecrementOperator" />
|
||||||
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPreIncrementOperator" />
|
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPreIncrementOperator" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint" />
|
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint" />
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification" />
|
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification" />
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
|
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
|
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
|
||||||
<!-- This sniff has been deprecated since Slevomat Coding Standard 8.16.0 and will be removed in Slevomat Coding Standard 9.0.0. Use SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead. -->
|
<!-- This sniff has been deprecated since Slevomat Coding Standard 8.16.0 and will be removed in Slevomat Coding Standard 9.0.0. Use SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead. -->
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat" />
|
<exclude name="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat" />
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.Whitespaces.DuplicateSpaces.DuplicateSpaces" />
|
<exclude name="SlevomatCodingStandard.Whitespaces.DuplicateSpaces.DuplicateSpaces" />
|
||||||
<exclude name="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator.DisallowedNumericLiteralSeparator" />
|
|
||||||
|
|
||||||
<!-- Отключил из-за-->
|
<!-- Отключил из-за-->
|
||||||
<exclude name="SlevomatCodingStandard.Classes.ClassStructure.IncorrectGroupOrder" />
|
<exclude name="SlevomatCodingStandard.Classes.ClassStructure.IncorrectGroupOrder" />
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Force array element indentation with 4 spaces -->
|
<!-- Force array element indentation with 4 spaces -->
|
||||||
<rule ref="Generic.Arrays.ArrayIndent"/>
|
<rule ref="Generic.Arrays.ArrayIndent"/>
|
||||||
<!-- Forbid `array(...)` -->
|
<!-- Forbid `array(...)` -->
|
||||||
@@ -391,22 +386,10 @@
|
|||||||
<!-- Require presence of declare(strict_types=1) -->
|
<!-- Require presence of declare(strict_types=1) -->
|
||||||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
||||||
<properties>
|
<properties>
|
||||||
<property
|
<property name="declareOnFirstLine" value="false"/>
|
||||||
name="declareOnFirstLine"
|
<property name="linesCountBeforeDeclare" value="1"/>
|
||||||
value="false"
|
<property name="spacesCountAroundEqualsSign" value="0"/>
|
||||||
/>
|
<property name="linesCountAfterDeclare" value="1"/>
|
||||||
<property
|
|
||||||
name="linesCountBeforeDeclare"
|
|
||||||
value="1"
|
|
||||||
/>
|
|
||||||
<property
|
|
||||||
name="spacesCountAroundEqualsSign"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
<property
|
|
||||||
name="linesCountAfterDeclare"
|
|
||||||
value="1"
|
|
||||||
/>
|
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
@@ -546,16 +529,8 @@
|
|||||||
<exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
|
<exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
|
||||||
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
|
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
|
||||||
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamName"/>
|
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamName"/>
|
||||||
|
|
||||||
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
|
|
||||||
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.Line"/>
|
|
||||||
|
|
||||||
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle"/>
|
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle"/>
|
||||||
</rule>
|
<exclude name="Squiz.Commenting.FunctionComment.MissingParamName"/>
|
||||||
|
|
||||||
<rule ref="Squiz.Commenting.FunctionComment.MissingParamName">
|
|
||||||
<!-- Отключаем только эту конкретную ошибку, оставляя остальные проверки комментариев -->
|
|
||||||
<severity>0</severity>
|
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- Forbid global functions -->
|
<!-- Forbid global functions -->
|
||||||
@@ -628,5 +603,4 @@
|
|||||||
<!-- turned off by PSR-12 -> turning back on -->
|
<!-- turned off by PSR-12 -> turning back on -->
|
||||||
<severity>5</severity>
|
<severity>5</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|||||||
Reference in New Issue
Block a user