-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpcs.xml exclusion patterns being ignored #47
Comments
Hey @NickGreen, I can see a comment here from @mrrobot47 mentioning the following: # Delete all the folders to be skipped to ignore them from being scanned. I think you want to know why this is happening. Let me know if I got the problem statement right. The issue is happening due to this maybe. I have also tried using this from VIP documentation but the output was almost the same. cc: @mrrobot47 |
Ah, that's interesting, I hadn't seen that. I'll test removing the "SKIP_FOLDERS" and see if it then honors the exclusion patterns in the xml file. |
@NickGreen It will not. |
Closing this issue. You can use either
This does not happen because of the temp files created for getting just the diff of PR. And then the PHPCS scan running on those temp files. And these temp files do not match with any written exclude patterns. |
Problem
When we set
<exclude-pattern>
in the phpcs.xml file, those are being ignored, and the specified folders are being scanned anyway.Desired behavior
The exclusions in the phpcs.xml file should be honored, and the specified folders should be ignored during sniffing. For example, here's one of our phpcs.xml files:
In this case, the plugins folder should not be sniffed. However, it is still getting sniffed.
Workaround
We've added the plugins folder to the SKIP_FOLDERS setting in the action itself, e.g.:
The text was updated successfully, but these errors were encountered: