Commit Graph

377 Commits

Author SHA1 Message Date
Joel Bastos
b14fa5a0d8 Fix typos on help description 2017-03-10 17:11:09 +00:00
Anthony Sottile
c65a11ce3d Replace five with six 2017-03-08 14:25:54 -08:00
Anthony Sottile
cb8dd335f4 Replace jsonschema with better error messages 2017-03-08 14:07:00 -08:00
Anthony Sottile
63d6bed423 Use our VERSION constant moar 2017-03-06 13:27:45 -08:00
Anthony Sottile
05c88738b0 Add a --show-diff-on-failure option 2017-02-25 10:14:17 -08:00
Anthony Sottile
7a579af884 Merge pull request #497 from pre-commit/future_versions
Make hook-tmpl resilient to future changes
2017-02-23 16:15:23 -05:00
Anthony Sottile
dbd131f646 Minor fixups 2017-02-23 13:11:40 -08:00
Filippos Giannakos
2f4199850d Add --allow-missing-config option to install
When no '.pre-commit-config.yaml' file exists while `pre-commit` hooks
are enabled, `pre-commit` returns an error and the action is aborted.
This is a very common scenario when pre-commit is added later on a
project and the user wants to work on a previous branch where the
configuration file does not exist.

This commits allow the user to optionally install the `pre-commit` hooks
with an option to allow a missing configuration and trigger only the
legacy pre-commit hooks (if any) when it is missing.
2017-02-23 18:25:51 +02:00
Anthony Sottile
173ce83484 Make hook-tmpl resilient to future changes 2017-02-22 08:48:36 -08:00
Anthony Sottile
5bfe4e5366 Validate minimum version for local hooks as well 2017-02-16 14:30:01 -08:00
Anthony Sottile
31ccc19ba3 Encode the 'local hooks repo' version into the store 2017-02-16 12:32:58 -08:00
Anthony Sottile
e4eb2b0fc5 __defaults__ is available in py27 2017-02-16 10:46:23 -08:00
Anthony Sottile
109c17c5df Some minor constants cleanup 2017-02-16 10:44:08 -08:00
Anthony Sottile
aa72fe5d3f Make the dummy gem valid by giving it a summary 2017-02-16 10:07:04 -08:00
Anthony Sottile
f000241dcb Local repositories clone a blank repo 2017-02-15 15:36:53 -08:00
Anthony Sottile
e704edb5e2 Refactor Repository to be more functional 2017-02-15 12:46:08 -08:00
Anthony Sottile
f7b2948368 Rename some variables to be more like our internal state 2017-02-15 08:57:10 -08:00
Anthony Sottile
36cfeac952 hook-tmpl doesn't need executable bit, we set it 2017-02-15 08:51:06 -08:00
Filippos Giannakos
8c78ddfd5c Improve pre-push fileset for a new remote branch
When pushing a branch that does not exist on the remote repository,
instead of blindly running the checks on every file, this commit locates
the first ancestor not present on the remote repository and uses its
parent as the source of the fileset calculation. If it has no parents,
then the remote repository has no common commits and the checks should
be run on all files.
2017-02-14 19:19:35 +02:00
Alex Hutton
42000c4521 Fix eslint on windows
- The bare exe was the first filename attempted to match,
  this changes means it will be matched last, allowing other files
  to be matched if they exist. The result is that eslint now works
  on Windows.
2017-02-10 18:09:00 +11:00
Thierry Deo
397efa8080 Keep additional_dependencies in the order in which they are specified 2017-02-09 18:09:09 +01:00
Anthony Sottile
c08400e2bc Improve messaging for missing hook given #480 2017-01-30 20:43:20 -08:00
Anthony Sottile
8d589a5e97 Make autoupdate slightly more future proof 2017-01-30 18:54:56 -08:00
Anthony Sottile
7e512004d6 Remove pre_commit.ordereddict module 2017-01-30 08:21:34 -08:00
Anthony Sottile
8c27f2c50b Put the . in docker build at the end.
Resolves #477
2017-01-27 14:22:00 -08:00
Anthony Sottile
52cd42316c Add a --tags-only option to autoupdate 2017-01-25 21:02:50 -08:00
Anthony Sottile
51d673dff5 Remove unnecessary files after installation 2017-01-25 16:45:03 -08:00
Anthony Sottile
84ba1fd0c2 additional_dependencies support for golang hooks 2017-01-25 13:44:35 -08:00
Anthony Sottile
aea9d8e49b The golang tests pass on windows 2017-01-24 21:17:12 -08:00
Anthony Sottile
068c18d38a Add first class support for golang hooks 2017-01-24 13:49:22 -08:00
Chris Kuehl
8f057b0b1b Ignore bundle config files when running ruby hooks 2017-01-23 21:23:14 -08:00
Anthony Sottile
b9e5184ebd Introduce .pre-commit-hooks.yaml as a replacement for hooks.yaml 2017-01-21 13:47:59 -08:00
Anthony Sottile
ba75867c93 py27+ syntax improvements 2017-01-21 11:49:53 -08:00
Anthony Sottile
b6937f33e2 Fixups to make appveyor happy 2017-01-16 18:50:49 -08:00
Ben Asher
14cebbb25f PR feedback fixes 2017-01-13 13:05:44 -08:00
Ben Asher
c68ef12484 fixed path to binary 2017-01-13 11:38:47 -08:00
Ben Asher
b271060aef fix CI issues 2017-01-13 11:23:16 -08:00
Ben Asher
8893127f27 correctly use ENVIRONMENT_DIR 2017-01-13 11:20:25 -08:00
Ben Asher
bea4e89a48 SwiftPM support 2017-01-13 10:19:41 -08:00
Anthony Sottile
6055af8bc8 Make shlex behaviour of entry more consistent 2017-01-05 11:52:29 -08:00
Ben Picolo
8cbd56a0a5 Put user back where it was 2017-01-05 12:55:08 -05:00
Ben Picolo
54d212f0d7 Use shlex.split 2017-01-05 10:52:31 -05:00
Ben Picolo
b7bd825e15 Support docker hooks with args 2017-01-05 09:31:22 -05:00
Anthony Sottile
e022bc6735 Only --pull on initial docker build 2017-01-04 11:27:40 -08:00
Anthony Sottile
6046b8bd7e Merge pull request #459 from bpicolo/docker_support
Docker hook support for pre-commit
2017-01-04 10:51:25 -08:00
Ben Picolo
b06da3e9cd Code review tweaks 2017-01-04 13:05:54 -05:00
Ben Picolo
86c0e6d297 Inverse md5 bytesifying 2017-01-04 10:52:56 -05:00
Anthony Sottile
f238495d6b Add an install-hooks command (similar to install --install-hooks). Resolves #456 2017-01-04 07:52:16 -08:00
Ben Picolo
baf254ab78 Fix user so we can mount volumes as RW 2017-01-04 10:44:18 -05:00
Ben Picolo
9b92f96ed0 Code cleanup and tests 2017-01-04 10:35:00 -05:00