coding-standard icon indicating copy to clipboard operation
coding-standard copied to clipboard

Is it possible to add exclude not for all but by class

Open devbysb opened this issue 3 years ago • 3 comments

Hi

is it possible to add exclude Path/file not for all class but configure by class

return [
    'preset' => 'symfony',
    'ide' => 'phpstorm',
    'exclude' => [
        'migrations',
        // will exclude Migrations Folder in src
        '*Repository.php',
        // will exclude every php files that match pattern
        'src/Kernel.php',
        // will exclude this file only
    ],
]

but for each class like this


<?php

declare(strict_types=1);

return [
    'preset' => 'symfony',
    'ide' => 'phpstorm',
    'exclude' => [
        'migrations',
        // will exclude Migrations Folder in src
        '*Repository.php',
        // will exclude every php files that match pattern
        'src/Kernel.php',
        // will exclude this file only
    ],

    'config' => [
        SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff::class => [
		'exclude' => [
			'src/Form',
		]
        ],
];

It can permit to change exclude by class if we want to override

Thank you

devbysb avatar Mar 18 '22 14:03 devbysb

It does not look like PHPCS configuration so I don't understand.

kukulich avatar Mar 18 '22 14:03 kukulich

It s for exclude some path only for some tests or add some path to exclude only for some tests

I m sorry if I not clear

devbysb avatar Mar 18 '22 14:03 devbysb

I don't know this format.

kukulich avatar Mar 18 '22 14:03 kukulich

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Mar 05 '23 00:03 github-actions[bot]