rector/ecs.yaml

92 lines
4.0 KiB
YAML

services:
SlevomatCodingStandard\Sniffs\Commenting\DisallowCommentAfterCodeSniff: null
SlevomatCodingStandard\Sniffs\Whitespaces\DuplicateSpacesSniff: null
parameters:
paths:
- "bin"
- "src"
- "packages"
- "rules"
- "tests"
- "utils"
- "compiler"
sets:
- "psr12"
- "php70"
- "php71"
- "symplify"
- "common"
- "clean-code"
exclude_files:
# tests files
- '*/Source/*'
- '*/Fixture/*'
- '*/Expected/*'
# generated
- 'packages/doctrine-annotation-generated/src/ConstantPreservingDocParser.php'
- 'packages/doctrine-annotation-generated/src/ConstantPreservingAnnotationReader.php'
skip:
# rather useless
PhpCsFixer\Fixer\Import\GlobalNamespaceImportFixer: null
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer: null
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff.Underscore: null
Symplify\CodingStandard\Sniffs\Architecture\DuplicatedClassShortNameSniff: null
# run manually from time to time - performance demanding + not to bother user with it
Symplify\CodingStandard\Fixer\Order\PropertyOrderByComplexityFixer: null
Symplify\CodingStandard\Fixer\Order\PrivateMethodOrderByUseFixer: null
PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer:
- 'rules/php74/src/Rector/Double/RealToFloatTypeCastRector.php'
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.FoundInWhileCondition: null
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingParameterTypeHint:
# 3rd party parent code
- 'src/DependencyInjection/Loader/TolerantRectorYamlFileLoader.php'
- 'src/PhpParser/Printer/BetterStandardPrinter.php'
- 'tests/AbstractContainerAwareTestCase.php'
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingTraversableReturnTypeHintSpecification:
# false positive
- 'src/Testing/PHPUnit/AbstractRectorTestCase.php'
SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff.UnusedVariable:
- 'rules/php-office/src/Rector/MethodCall/IncreaseColumnIndexRector.php'
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff.Found:
# notes
- 'rules/php72/src/Rector/Each/ListEachRector.php'
- 'rules/dead-code/src/Rector/ClassMethod/RemoveOverriddenValuesRector.php'
- 'rules/php-spec-to-phpunit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php'
PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer:
- 'packages/better-php-doc-parser/tests/PhpDocInfo/PhpDocInfo/PhpDocInfoTest.php'
# intentional "assertEquals()"
- 'tests/PhpParser/Node/NodeFactoryTest.php'
- '*TypeResolverTest.php'
# conflicts with "PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer"
PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: null
PhpCsFixer\Fixer\Strict\StrictComparisonFixer:
# part of the comparison logic
- 'packages/polyfill/src/ConditionEvaluator.php'
# often soo many cases that need manual attention → skip and resole in automated way
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff.PartialUse: null
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff.ReferenceViaFullyQualifiedName:
# special case for optional entity classes in refactored project
- 'packages/better-php-doc-parser/src/PhpDocNodeFactory/Doctrine/Property_/DoctrineTargetEntityPhpDocNodeFactory.php'
- 'packages/better-php-doc-parser/src/PhpDocNodeFactory/Doctrine/Property_/JoinTablePhpDocNodeFactory.php'
- 'packages/better-php-doc-parser/src/PhpDocNodeFactory/Doctrine/Class_/TablePhpDocNodeFactory.php'
- 'packages/better-php-doc-parser/src/PhpDocNodeFactory/JMS/JMSInjectPhpDocNodeFactory.php'
line_ending: "\n"