Script to create the Git pre-commit hook.#4622
Script to create the Git pre-commit hook.#4622schlessera merged 2 commits intowp-cli:masterfrom tiagohillebrandt:master
Conversation
|
Thanks for the PR @tiagohillebrandt! Although marked for the 1.5.0 milestone, this issue isn't a priority at the moment so it may take a little while before your PR is reviewed. |
danielbachhuber
left a comment
There was a problem hiding this comment.
👍 Looks reasonable to me. I'd like to get a second pair of eyes though.
|
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. |
Isn't this what our existing code does? I don't think it's an optimization we need right now... |
|
Yes, you're right. Let's just go with this and try how it plays out. There's nothing preventing us from changing it down the line in case it is problematic. |
Isn't this better than waiting for Travis to build, and then having to come back ground to it? |
|
It just takes too much time. I'll add another PR to change this so it only checks files that were changed. |
No! |
This avoids causing unnecessary delays when committing files. See #4622 (comment)

Creates a Git pre-commit file to run phpcs once every commit (#4474).