Closed claudiu-cristea closed 3 months ago
@claudiu-cristea Thanks for reporting this, but I don't think this is a bug in PHPCS. Rather, I think this is a problem with the paths not matching.
And yes, I've tested and could not reproduce the issue with the scenarios I ran.
To help you figure this out, I need more information though.
phpcs.xml
file located in your directory structure ?Closing for lack of feedback. The issue can be reopened if the OP responds.
Describe the bug
phpcs.xml:
When I run
The file shouldn't be checked because is has been excluded in
phpcs.xml
, which is used to run the command.Here's a use case: I'm detecting all changed files when pushing to a Git remote repository because I want to run PHPCS on Git
pre-push
hook. The set of files may contain files that are excludedphpcs.xml
. I'm expecting that, even I'm passing them tophpcs
, as arguments,phpcs.xml
is honoured.Code sample
See "Describe the bug" section
Custom ruleset
See "Describe the bug" section
To reproduce
See "Describe the bug" section
Expected behavior
Even paths or files are passed as arguments to the command line, I'm expecting that file/path exclusions, configured in
phpcs.xml
are respected.Versions (please complete the following information)
Additional context
None.
Please confirm
master
branch of PHP_CodeSniffer.