Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Script to create the Git pre-commit hook. #4622
The immediate problem I see is that this always runs PHPCS over the entire codebase, not over the commit that was staged.
It would be preferable to only check the files or even only lines that are being modified, otherwise you might not be able to commit something due to unrelated problems.