rector/ecs.yaml

140 lines
6.6 KiB
YAML
Raw Normal View History

2018-04-02 00:40:05 +02:00
imports:
- { resource: 'vendor/symplify/easy-coding-standard/config/psr2.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/php71.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/symplify.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/common.yml' }
- { resource: 'vendor/symplify/easy-coding-standard/config/clean-code.yml' }
2017-08-04 08:20:18 +02:00
2018-04-02 00:40:05 +02:00
services:
2018-09-24 18:06:41 +02:00
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
allow_classes:
- 'SomeClass' # from PHPUnit
2019-03-15 11:53:06 +01:00
- 'PHPUnit\Framework\TestCase' # usually part of node construction, it can be missed
2018-09-24 18:06:41 +02:00
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\Sniffs\DependencyInjection\NoClassInstantiationSniff:
extra_allowed_classes:
- 'PHPStan\Type\*'
- 'PHPStan\Analyser\Scope'
- 'PhpParser\NodeVisitor\NameResolver'
2017-09-03 14:37:36 +02:00
- 'PhpParser\Node\*'
2018-11-05 09:08:27 +01:00
- 'PhpParser\Comment'
- 'PhpParser\Comment\Doc'
- 'PhpParser\NodeTraverser'
2018-02-08 16:51:16 +01:00
- 'Rector\Reporting\FileDiff'
2018-04-03 01:11:23 +02:00
- 'Rector\RectorDefinition\*'
2018-09-17 12:38:11 +02:00
- 'Rector\Application\Error'
2018-10-06 01:13:09 +08:00
- 'Rector\DependencyInjection\Loader\*'
- 'Symplify\PackageBuilder\*'
- 'Symfony\Component\Console\Input\*Input'
2017-10-18 14:52:18 +02:00
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
extra_skipped_classes:
- 'PhpParser\PrettyPrinter\Standard'
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:
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/*'
2018-04-08 20:45:10 +02:00
2017-08-09 17:37:49 +02:00
skip:
2019-03-07 23:15:24 +00:00
Symplify\CodingStandard\Sniffs\Architecture\DuplicatedClassShortNameSniff: ~
# run manually from time to time - performance demanding + not to bother user with it
Symplify\CodingStandard\Fixer\Order\PropertyOrderByComplexityFixer: ~
Symplify\CodingStandard\Fixer\Order\PrivateMethodOrderByUseFixer: ~
2019-01-22 20:40:27 +01:00
2019-01-08 11:37:34 +01:00
PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer:
- 'packages/Php/src/Rector/Double/RealToFloatTypeCastRector.php'
2019-01-22 20:40:27 +01:00
Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenReferenceSniff:
# 3rd party contract
- 'src/PhpParser/Printer/BetterStandardPrinter.php'
2017-08-12 13:34:40 +02:00
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
2017-08-24 12:13:51 +02:00
# classes might not exist
2018-08-03 09:17:19 +02:00
- 'bin/bootstrap.php'
2018-06-02 13:41:07 +02:00
- '*/packages/*/src/Rector/*Rector.php'
2018-07-25 13:06:07 +02:00
- 'src/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php'
- 'src/Rector/Constant/RenameClassConstantsUseToStringsRector.php'
2018-04-02 00:40:05 +02:00
- '*/packages/NodeTypeResolver/**/PerNodeTypeResolver/**TypeResolver.php'
- '*/packages/NodeTypeResolver/**/PerNodeTypeResolver/**TypeResolver/*Test.php'
- '*RectorTest.php'
2018-04-02 00:40:05 +02:00
- 'src/Rector/AbstractPHPUnitRector.php'
- 'src/Rector/Class_/ParentClassToTraitsRector.php'
# required for exact string match with "\"
- 'packages/NodeTypeResolver/src/Php/AbstractTypeInfo.php'
# example in description
- 'src/Rector/Annotation/RenameAnnotationRector.php'
- 'packages/NetteToSymfony/src/Event/EventInfosFactory.php'
2019-03-16 22:52:33 +01:00
- 'packages/NetteTesterToPHPUnit/src/AssertManipulator.php'
2018-02-16 12:36:55 +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'
2018-08-06 14:16:17 +02:00
Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer:
- 'packages/NodeTypeResolver/src/PHPStan/Scope/NodeScopeResolver.php'
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:
# tough logic
- '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'
- 'packages/ContributorTools/src/Command/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'
2019-02-02 15:31:43 +01:00
2018-10-08 13:19:10 +08:00
# copied 3rd party logic
- 'packages/Php/src/EregToPcreTransformer.php'
# dev
- 'packages/Php/src/Rector/FunctionLike/*TypeDeclarationRector.php'
2018-12-31 16:29:12 +01:00
- 'packages/Php/src/Rector/If_/IfToSpaceshipRector.php'
Symplify\CodingStandard\Sniffs\ControlStructure\SprintfOverContactSniff:
# respects inherited pattern for better comparing
- 'src/PhpParser/Printer/BetterStandardPrinter.php'
2018-10-05 22:09:00 +08:00
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.FoundInWhileCondition: ~
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
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff.Found:
# notes
- 'packages/Php/src/Rector/Each/ListEachRector.php'
- 'packages/DeadCode/src/Rector/ClassMethod/RemoveOverriddenValuesRector.php'
- 'packages/PhpSpecToPHPUnit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php'
2019-01-31 22:31:42 +01:00
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
# 3rd party api
- 'src/PhpParser/Node/Value/ValueResolver.php'