navarr / phpcs-action

Github Action helps you check your code with PHP_CodeSniffer
MIT License
1 stars 0 forks source link

only_changed_files ignores phpcs.xml config #2

Open michalbiarda opened 1 year ago

michalbiarda commented 1 year ago

I have a very simple phpcs.xml that specify which folder of my app should be checked, using <file>. I noticed that when I'm using phpcs-action with only_changed_files, <file> config is not respected, and the action is checking also changed files in different folders.

navarr commented 1 year ago

This is currently expected behavior, and would be a larger lift than you'd anticipate to change

When only_changed_files is enabled, the changed files are provided to phpcs. In that instance, phpcs ignores all file and directory directives and tests those files specifically