mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
161 lines
6.8 KiB
YAML
161 lines
6.8 KiB
YAML
services:
|
|
Symplify\CodingStandard\Sniffs\CleanCode\ClassCognitiveComplexitySniff:
|
|
max_class_cognitive_complexity: 50
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
|
|
max_cognitive_complexity: 9
|
|
|
|
Symplify\CodingStandard\Fixer\Order\MethodOrderByTypeFixer:
|
|
method_order_by_type:
|
|
Rector\Contract\Rector\PhpRectorInterface:
|
|
- 'getDefinition'
|
|
- 'getNodeTypes'
|
|
- 'refactor'
|
|
|
|
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
|
|
extra_skipped_classes:
|
|
- 'PhpParser\PrettyPrinter\Standard'
|
|
- '?string' # bug probably
|
|
|
|
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
|
|
extra_parent_types_to_suffixes:
|
|
- 'Rector'
|
|
- 'NodeVisitorAbstract'
|
|
|
|
parameters:
|
|
paths:
|
|
- "ci"
|
|
- "bin"
|
|
- "src"
|
|
- "packages"
|
|
- "rules"
|
|
- "tests"
|
|
- "utils"
|
|
- "compiler"
|
|
|
|
sets:
|
|
- "psr12"
|
|
- "php70"
|
|
- "php71"
|
|
- "symplify"
|
|
- "common"
|
|
- "clean-code"
|
|
|
|
exclude_files:
|
|
- '*tests/**Source/*.php'
|
|
# tests files
|
|
- '*tests/*/Fixture/*'
|
|
- '*tests/*/Expected/*'
|
|
- '*utils/ContributorTools/templates/*'
|
|
- 'stubs/*'
|
|
# exclude
|
|
- 'src/Rector/AbstractRector.php'
|
|
- 'src/PhpParser/BetterNodeDumper.php'
|
|
|
|
skip:
|
|
# rather useless
|
|
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff: null
|
|
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'
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenReferenceSniff: null
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenStaticFunctionSniff:
|
|
- 'src/Util/*.php'
|
|
- 'packages/better-php-doc-parser/src/Annotation/AnnotationNaming.php'
|
|
- 'src/Testing/PHPUnit/PHPUnitEnvironment.php'
|
|
# honesty first
|
|
- 'src/*Static*.php'
|
|
|
|
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
|
|
- 'packages/NodeTypeResolver/src/PHPStan/Scope/NodeScopeResolver.php'
|
|
- 'compiler/src/*'
|
|
|
|
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
|
|
# hidden API
|
|
- 'src/Rector/AbstractRector.php'
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\ClassCognitiveComplexitySniff:
|
|
# node printing
|
|
- 'utils/documentation-generator/src/Command/DumpNodesCommand.php'
|
|
# 3rd party code
|
|
- 'rules/php70/src/EregToPcreTransformer.php'
|
|
|
|
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
|
|
# todo
|
|
- "packages/better-php-doc-parser/src/Printer/WhitespaceDetector.php"
|
|
- "packages/node-type-resolver/src/NodeTypeResolver.php"
|
|
- "packages/better-php-doc-parser/src/Printer/OriginalSpacingRestorer.php"
|
|
# @todo split to multiple rectors
|
|
- "rules/php-spec-to-phpunit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php"
|
|
|
|
- "packages/better-php-doc-parser/src/PhpDocNode/Doctrine/Property_/ColumnTagValueNode.php"
|
|
- "packages/better-php-doc-parser/src/PhpDocNode/Doctrine/Property_/JoinColumnTagValueNode.php"
|
|
- "rules/coding-style/src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php"
|
|
|
|
# per node logic
|
|
- 'utils/documentation-generator/src/Command/DumpNodesCommand.php'
|
|
# copied 3rd party logic
|
|
- 'rules/php70/src/EregToPcreTransformer.php'
|
|
# dev
|
|
- 'packages/type-declaration/src/Rector/FunctionLike/*TypeDeclarationRector.php'
|
|
- 'rules/php70/src/Rector/If_/IfToSpaceshipRector.php'
|
|
|
|
Symplify\CodingStandard\Sniffs\ControlStructure\SprintfOverContactSniff:
|
|
# respects inherited pattern for better comparing
|
|
- 'src/PhpParser/Printer/BetterStandardPrinter.php'
|
|
- 'src/Rector/AbstractRector/BetterStandardPrinterTrait.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'
|
|
|
|
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'
|
|
- 'rules/cakephp-to-symfony/tests/Rector/Class_/CakePHPModelToDoctrineRepositoryRector/CakePHPModelToDoctrineRepositoryRectorTest.php'
|
|
|
|
PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer:
|
|
- 'packages/better-php-doc-parser/tests/PhpDocInfo/PhpDocInfo/PhpDocInfoTest.php'
|
|
# intentional "assertEquals()"
|
|
- 'tests/PhpParser/Node/NodeFactoryTest.php'
|
|
- '*TypeResolverTest.php'
|
|
|
|
Symplify\CodingStandard\Sniffs\Commenting\AnnotationTypeExistsSniff:
|
|
- '*PhpDocNodeFactory.php'
|
|
- '*AnnotationReader.php'
|
|
- 'compiler/src/*'
|
|
|
|
# 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'
|
|
|
|
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff.PartialUse:
|
|
- "rules/dead-code/src/Rector/Plus/RemoveDeadZeroAndOneOperationRector.php"
|
|
- "rules/php56/src/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector.php"
|
|
|
|
line_ending: "\n"
|