Skip to content
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

DT-593: Codesniffing via pre-commit hook does not respect filesets #3448

Closed
danepowell opened this issue Mar 12, 2019 · 2 comments · Fixed by #3902
Closed

DT-593: Codesniffing via pre-commit hook does not respect filesets #3448

danepowell opened this issue Mar 12, 2019 · 2 comments · Fixed by #3902
Labels
Bug Something isn't working

Comments

@danepowell
Copy link
Contributor

This is the root cause of numerous other issues, most recently #3366 (which has my thoughts on the issue and some additional background), but also #2879 and others. We should fix it for real.

@danepowell
Copy link
Contributor Author

It seems like the Twig validator handles this okay by using FilesetManager::filterFilesByFileset(), maybe replicate that pattern.

@danepowell danepowell modified the milestones: 10.1.0, 10.2.0 May 30, 2019
@danepowell danepowell changed the title Codesniffing via pre-commit hook does not respect filesets DT-593: Codesniffing via pre-commit hook does not respect filesets Aug 28, 2019
@danepowell
Copy link
Contributor Author

To be more specific, the problem here is when you've dirtied a versioned file that isn't specifically excluded by phpcs.xml. PHPCS won't sniff files that are excluded even when specifically passed as an argument (good), but it will sniff them if they aren't already listed as a <file> (bad, if you are trying to have consistent behavior between blt validate and git commits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant