-
Notifications
You must be signed in to change notification settings - Fork 58
Implement patch checking during pre-commit hook #127
Conversation
* Patch checking is aware of the Git index, so only staged changes will be checked. * Consolidates pre-commit and Travis CI logic into common library. * Moves Travis before_script logic into install script.
Looks good! We'll need to test this PR out with some repos to verify backwards compatibility. |
Thanks. Back compat isn't so important as it working. The .travis.yml will have to be updated to refer to the install script. Projects using dev-lib won't break if this gets merged because the submodule will be pegging it as a compatible state. I have tested this in the pre-commit hook but I need to run through the tests for Travis still. This should be a huge improvement to ensuring quality across repos, as PHPCS is downloaded if not already installed and it checks patches instead of the full codebases. This has been a long time in coming! |
I'm also wary of Windows compatibility, but I'm not going to worry too much about that :-) |
a757b09
to
08e2416
Compare
08e2416
to
11faa88
Compare
11faa88
to
36f2d4d
Compare
I went through and tested the scenarios in Travis: xwp/wp-customize-widgets-plus#41 And then I made the necessary fixes here. The required changes to support the new dev-lib can be seen here: xwp/wp-customize-widgets-plus#42 @valendesigns See anything else I missed? If not, please merge. |
echo "LIMIT_TRAVIS_PR_CHECK_SCOPE is obsolete; use CHECK_SCOPE env var instead" 1>&2 | ||
return 1 | ||
fi | ||
CHECK_SCOPE=${CHECK_SCOPE:-changed-files} # 'all', 'changed-files', 'patches' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe patches
should be the default?
6062701
to
bc1429b
Compare
bc1429b
to
614a334
Compare
ae985c4
to
38ec543
Compare
I made the change you wanted to default to |
Implement patch checking during pre-commit hook
Fixes #126
Fixes #100
Fixes #77
Fixes #40
Fixes #49
Fixes #30
Fixes #28