rector/ecs.yaml

179 lines
9.0 KiB
YAML
Raw Normal View History

2018-04-02 00:40:05 +02:00
services:
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'
2017-10-18 14:52:18 +02:00
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
extra_skipped_classes:
- 'PhpParser\PrettyPrinter\Standard'
- '?string' # bug probably
2017-10-18 14:52:18 +02:00
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
extra_parent_types_to_suffixes:
- 'Rector'
2018-08-10 14:26:05 +02:00
- 'NodeVisitorAbstract'
2018-02-25 18:34:21 +01:00
2017-08-09 17:37:49 +02:00
parameters:
2019-12-18 10:02:20 +01:00
sets:
- 'psr12'
2020-01-12 14:21:49 +01:00
- 'php70'
2019-12-18 10:02:20 +01:00
- 'php71'
- 'symplify'
- 'common'
- 'clean-code'
2018-04-08 20:45:10 +02:00
exclude_files:
- '*tests/**Source/*.php'
2018-08-14 13:24:34 +02:00
# tests files
2018-12-06 01:55:00 +01:00
- '*tests/*/Fixture/*'
- '*tests/*/Expected/*'
2019-02-21 15:36:16 +01:00
- '*utils/ContributorTools/templates/*'
2019-08-30 08:27:03 +02:00
- 'stubs/*'
2019-09-15 20:54:06 +02:00
- '*/Expected/*'
# exclude
- 'src/Rector/AbstractRector.php'
- 'src/PhpParser/BetterNodeDumper.php'
2018-04-08 20:45:10 +02:00
2017-08-09 17:37:49 +02:00
skip:
2019-10-30 10:55:04 +01:00
# rather useless
2020-01-05 20:00:32 +01:00
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff: null
PhpCsFixer\Fixer\Import\GlobalNamespaceImportFixer: null
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer: null
2019-10-30 10:55:04 +01:00
2020-01-05 20:00:32 +01:00
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff.Underscore: null
Symplify\CodingStandard\Sniffs\Architecture\DuplicatedClassShortNameSniff: null
2019-03-07 23:15:24 +00:00
# run manually from time to time - performance demanding + not to bother user with it
2020-01-05 20:00:32 +01:00
Symplify\CodingStandard\Fixer\Order\PropertyOrderByComplexityFixer: null
Symplify\CodingStandard\Fixer\Order\PrivateMethodOrderByUseFixer: null
2019-01-22 20:40:27 +01:00
2019-01-08 11:37:34 +01:00
PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer:
- 'packages/Php74/src/Rector/Double/RealToFloatTypeCastRector.php'
2019-01-08 11:37:34 +01:00
2020-01-05 20:00:32 +01:00
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenReferenceSniff: null
2019-01-22 20:40:27 +01:00
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenStaticFunctionSniff:
2018-12-17 00:00:16 +01:00
- 'src/Util/*.php'
2019-02-28 22:50:53 +01:00
- 'packages/BetterPhpDocParser/src/Annotation/AnnotationNaming.php'
2019-08-10 12:05:18 +02:00
- 'src/Testing/PHPUnit/PHPUnitEnvironment.php'
# honesty first
2019-10-22 15:44:36 +02:00
- 'src/*Static*.php'
2018-08-06 14:16:17 +02:00
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
- 'packages/NodeTypeResolver/src/PHPStan/Scope/NodeScopeResolver.php'
- 'compiler/src/*'
2018-08-10 14:26:05 +02:00
Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff:
# hidden API
- 'src/Rector/AbstractRector.php'
2018-09-26 19:41:53 +08:00
Symplify\CodingStandard\Sniffs\CleanCode\CognitiveComplexitySniff:
2020-01-31 09:52:34 +01:00
- 'packages/NodeTypeResolver/src/PhpDoc/NodeAnalyzer/DocBlockManipulator.php'
2020-01-04 15:50:14 +01:00
- 'packages/MinimalScope/src/Rector/Class_/ChangeLocalPropertyToVariableRector.php'
2020-01-30 22:11:29 +01:00
- 'packages/CodingStyle/src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php'
2019-10-10 17:32:18 +01:00
# solve later
- 'src/Console/Command/ScreenFileCommand.php'
- 'packages/Doctrine/src/Rector/ClassMethod/AddMethodCallBasedParamTypeRector.php'
- 'packages/TypeDeclaration/src/TypeInferer/ReturnTypeInferer/ReturnedNodesReturnTypeInferer.php'
2019-09-04 14:10:29 +02:00
- 'packages/NodeTypeResolver/src/NodeTypeResolver.php'
- 'packages/NodeTypeResolver/src/PerNodeTypeResolver/VariableTypeResolver.php'
- 'packages/Php71/src/Rector/FuncCall/RemoveExtraParametersRector.php'
2019-09-04 14:10:29 +02:00
- 'packages/SOLID/src/Analyzer/ClassConstantFetchAnalyzer.php'
2018-09-26 19:41:53 +08:00
# tough logic
- 'packages/Autodiscovery/src/Analyzer/ClassAnalyzer.php'
- 'packages/CodingStyle/src/Imports/ImportSkipper.php'
- 'packages/PHPUnit/src/Rector/Class_/ArrayArgumentInTestToDataProviderRector.php'
2019-09-26 16:26:44 +02:00
- 'packages/BetterPhpDocParser/src/Ast/PhpDoc/*/*TagValueNode.php'
2019-08-17 14:24:36 +02:00
- 'packages/NodeTypeResolver/src/PhpDoc/NodeAnalyzer/FqnNamePhpDocNodeDecorator.php'
- 'packages/NodeTypeResolver/src/PHPStan/Type/StaticTypeAnalyzer.php'
- 'src/NodeContainer/ParsedNodesByType.php'
- 'packages/PHPStanStaticTypeMapper/src/PHPStanStaticTypeMapper.php'
- 'packages/NodeTypeResolver/src/StaticTypeMapper.php'
- 'packages/PHPStan/src/Rector/Node/RemoveNonExistingVarAnnotationRector.php'
- 'packages/Architecture/src/Rector/Class_/ConstructorInjectionToActionInjectionRector.php'
2019-06-03 10:34:55 +03:00
- 'src/PhpParser/Node/Commander/NodeRemovingCommander.php'
- 'packages/BetterPhpDocParser/src/*'
2019-06-01 00:26:19 +03:00
- 'packages/Symfony/src/Rector/Class_/MakeCommandLazyRector.php'
- 'packages/Legacy/src/Rector/ClassMethod/ChangeSingletonToServiceRector.php'
- 'src/Rector/Psr4/MultipleClassFileToPsr4ClassesRector.php'
- 'src/PhpParser/Node/Resolver/NameResolver.php'
- 'src/Rector/MethodBody/NormalToFluentRector.php'
2019-02-21 15:36:16 +01:00
- 'packages/CodingStyle/src/Rector/Use_/RemoveUnusedAliasRector.php'
- 'packages/NetteToSymfony/src/Route/RouteInfoFactory.php'
- 'utils/*/DumpNodesCommand.php'
- 'packages/CodeQuality/src/Rector/Identical/SimplifyBoolIdenticalTrueRector.php'
2019-02-28 22:50:53 +01:00
- 'packages/BetterPhpDocParser/src/Attributes/Ast/AttributeAwareNodeFactory.php'
- 'packages/Laravel/src/Rector/FuncCall/HelperFunctionToConstructorInjectionRector.php'
- 'packages/PhpSpecToPHPUnit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php'
2019-03-25 18:32:44 +01:00
- 'packages/NetteTesterToPHPUnit/src/AssertManipulator.php'
- 'packages/Legacy/src/NodeAnalyzer/SingletonClassMethodAnalyzer.php'
- 'src/Rector/AbstractRector/ComplexRemovalTrait.php'
2019-12-26 22:58:40 +01:00
- 'packages/TypeDeclaration/src/VendorLock/VendorLockResolver.php'
2019-12-26 23:07:44 +01:00
- 'packages/TypeDeclaration/src/PhpParserTypeAnalyzer.php'
- 'src/PhpParser/Node/Manipulator/IfManipulator.php'
2020-01-13 20:37:48 +01:00
- 'packages/DeadCode/src/Rector/ClassMethod/RemoveDelegatingParentCallRector.php'
# aliases
- 'packages/CodingStyle/src/Rector/Namespace_/ImportFullyQualifiedNamesRector.php'
2019-02-02 15:31:43 +01:00
2018-10-08 13:19:10 +08:00
# copied 3rd party logic
2019-09-23 16:36:58 +02:00
- 'packages/Php70/src/EregToPcreTransformer.php'
# dev
2019-05-09 12:09:33 +02:00
- 'packages/TypeDeclaration/src/Rector/FunctionLike/*TypeDeclarationRector.php'
- 'packages/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'
2018-10-05 22:09:00 +08:00
2020-01-05 20:00:32 +01:00
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.FoundInWhileCondition: null
2018-10-06 01:13:09 +08:00
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingParameterTypeHint:
# 3rd party parent code
- 'src/DependencyInjection/Loader/TolerantRectorYamlFileLoader.php'
- 'src/PhpParser/Printer/BetterStandardPrinter.php'
2019-02-06 12:23:31 +01:00
- 'tests/AbstractContainerAwareTestCase.php'
2018-10-07 17:53:59 +08:00
2019-04-29 06:18:05 +02:00
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingTraversableReturnTypeHintSpecification:
# false positive
- 'src/Testing/PHPUnit/AbstractRectorTestCase.php'
2018-10-07 17:53:59 +08:00
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff.Found:
# notes
- 'packages/Php72/src/Rector/Each/ListEachRector.php'
- 'packages/DeadCode/src/Rector/ClassMethod/RemoveOverriddenValuesRector.php'
- 'packages/PhpSpecToPHPUnit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php'
2020-01-23 00:59:09 +01:00
- 'packages/CakePHPToSymfony/tests/Rector/Class_/CakePHPModelToDoctrineRepositoryRector/CakePHPModelToDoctrineRepositoryRectorTest.php'
2019-01-31 22:31:42 +01:00
PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer:
- 'packages/BetterPhpDocParser/tests/PhpDocInfo/PhpDocInfo/PhpDocInfoTest.php'
2019-09-04 14:10:29 +02:00
# intentional "assertEquals()"
- 'tests/PhpParser/Node/NodeFactoryTest.php'
2019-09-04 14:10:29 +02:00
- '*TypeResolverTest.php'
2019-09-18 08:14:35 +02:00
Symplify\CodingStandard\Sniffs\Commenting\AnnotationTypeExistsSniff:
- '*PhpDocNodeFactory.php'
- '*AnnotationReader.php'
- 'compiler/src/*'
2019-10-13 07:59:52 +02:00
# conflicts with "PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer"
2020-01-05 20:00:32 +01:00
PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: null
PhpCsFixer\Fixer\Strict\StrictComparisonFixer:
# part of the comparison logic
- 'packages/Polyfill/src/ConditionEvaluator.php'
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff.PartialUse:
- "packages/DeadCode/src/Rector/Plus/RemoveDeadZeroAndOneOperationRector.php"
- "packages/Php56/src/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector.php"
line_ending: "\n"