rector/easy-coding-standard.neon
TomasVotruba 63c0669d7e cs fixes
2017-10-06 14:13:49 +02:00

77 lines
3.6 KiB
Plaintext

includes:
- vendor/symplify/easy-coding-standard/config/symfony-checkers.neon
- vendor/symplify/easy-coding-standard/config/symfony-risky-checkers.neon
- vendor/symplify/easy-coding-standard/config/php70-checkers.neon
- vendor/symplify/easy-coding-standard/config/php71-checkers.neon
- vendor/symplify/easy-coding-standard/config/symplify-checkers.neon
- vendor/symplify/easy-coding-standard/config/common.neon
- vendor/symplify/easy-coding-standard/config/spaces.neon
checkers:
# Slevomat
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
allowPartialUses: false
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff:
enableEachParameterAndReturnInspection: true
usefulAnnotations:
- "@see"
# Metrics
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff:
absoluteLineLimit: 120
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff:
absoluteComplexity: 5
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff:
absoluteNestingLevel: 3
# Class should be Final or Abstract
- SlamCsFixer\FinalInternalClassFixer
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
extraAllowedClasses:
- 'PhpParser\Node\*'
- 'PhpParser\Comment\Doc'
- 'Rector\DeprecationExtractor\Deprecation\*'
# bugged: https://github.com/Symplify/Symplify/issues/372
- 'PhpParser\NodeTraverser'
parameters:
exclude_checkers:
# node style... add options to exclude naming, allow fnmatch as for New...Fixer
- Symplify\CodingStandard\Fixer\Naming\PropertyNameMatchingTypeFixer
# conflicting checkers
- PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer
# Excluded from symfony-checkers.neon
- PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer
- PhpCsFixer\Fixer\Operator\NewWithBracesFixer
- PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer
- PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer
- PhpCsFixer\Fixer\Phpdoc\PhpdocSummaryFixer
- PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer
- PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer
skip:
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer:
# classes might not exist
- */src/Rector/Contrib/*/*Rector.php
- packages/DeprecationExtractor/tests/Rector/RectorFactoryTest.php
- packages/NodeTypeResolver/src/NodeVisitor/TypeResolver.php
Symplify\CodingStandard\Sniffs\Classes\EqualInterfaceImplementationSniff:
# empty parent interface, disable for now
- packages/DeprecationExtractor/src/Deprecation/ClassMethodDeprecation.php
Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff:
# false positive - @todo fix
- packages/NodeTypeResolver/src/NodeVisitor/TypeResolver.php
# false positive - fixed in master
- src/NodeAnalyzer/ClassConstAnalyzer.php
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff:
# covariant types
- */packages/NodeValueResolver/src/PerNodeValueResolver/*ValueResolver.php
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
# temp ArgvInput: added to master
- bin/rector.php
# test file
- tests/Rector/Contrib/Nette/Routing/BootstrapToRouterFactoryRector/Wrong/bootstrap.php
# value object
- packages/NodeTypeResolver/src/NodeVisitor/NamespaceResolver.php