Commit Graph

36 Commits

Author SHA1 Message Date
Dain Liffman
d731652a22 Fix for #533 2017-05-31 10:09:42 +08:00
André Berti Sassi
e774c09fac Add pass_filenames hook option
This option controls whether filenames are passed along as arguments to
the hook program.
2017-05-13 14:28:17 -03:00
Anthony Sottile
840a55bbc3 Fixup log_file commit 2017-05-08 11:04:07 -07:00
Alex Hutton
f2644a4f2e Adds support for 'log_file' in hook config
Specify a filename on a per hook basis and
pre-commit will write the STDOUT and STDERR
of that hook into the file. Useful for CI.

Resolves #499.
2017-05-08 10:54:04 +10:00
Anthony Sottile
05c88738b0 Add a --show-diff-on-failure option 2017-02-25 10:14:17 -08:00
Anthony Sottile
ba75867c93 py27+ syntax improvements 2017-01-21 11:49:53 -08:00
Anthony Sottile
a7169905dc Centralize logging initialization 2016-11-26 14:19:37 -08:00
Anthony Sottile
0dda19f691 Reorganize output writing 2016-11-26 12:15:55 -08:00
Anthony Sottile
e832ddc57f Merge pull request #408 from pre-commit/no_pyterminalsize
Use 80 or min width instead of terminal size
2016-10-23 16:48:53 -07:00
Anthony Sottile
b81c9802ae Remove py26 format literals
Resolves #403
2016-09-15 08:41:58 -07:00
Anthony Sottile
a677c42e21 Use 80 or min width instead of terminal size 2016-08-31 17:15:52 -07:00
vinay karanam
81d7efa7bb only consider forward diff in changed files 2016-05-25 14:44:59 +05:30
Anthony Sottile
b7d395410b Implement a simplified xargs in python 2016-03-25 11:21:50 -07:00
Laurent Sigal
a72ca3d68e Less blocking logic 2015-12-22 19:06:31 +00:00
Laurent Sigal
5a08204b8d Allow to simply run a script once - no matter what the changes are 2015-12-22 18:12:08 +00:00
Joe Bateson
91a547ed61 Output a message when a hook fails due to file modification 2015-11-25 16:27:47 -08:00
Anthony Sottile
4b2f83d11e Fix hooks that apply non-utf8 diffs 2015-11-13 10:08:37 -08:00
Anthony Sottile
a3f78bc165 Fail a hook if it makes modifications. Resolves #285 2015-11-12 15:16:55 -08:00
Anthony Sottile
67ad0d2d8e Remove expected_return_value. Resolves #232 2015-11-12 13:50:29 -08:00
Barry Steyn
dd73ffd02f Filtering of hooks for commit or push stages 2015-10-05 07:17:20 -07:00
Anthony Sottile
66b1d39c6e Allow arbitrary bytes in output. Resolves #245 2015-07-23 12:59:13 -07:00
Anthony Sottile
53cc2a64c9 Allow unstaged config when running against files or all-files. Resolves #242 2015-06-15 11:25:58 -07:00
Anthony Sottile
a875231be3 Fixup 2015-05-10 17:00:23 -07:00
caffodian
1c28ae10f7 Fix for #157 (with upstream changes)
Conflicts:
	tests/commands/run_test.py
2015-05-10 16:25:05 -07:00
8geese
fdc2a889de fix for #157 2015-05-10 15:48:21 -07:00
Lucas Cimon
b68261c720 Adding support for locally-defined hooks 2015-05-10 23:57:34 +02:00
Anthony Sottile
d97ea30c4b Minor style change for consistency sake 2015-05-07 17:06:33 -07:00
LCM
7dd8c6ab4a Preparatory work & clean-up for #219
clientlib/validate_config.py: moving "sha" field requirement out of JSON schema
commands/run.py: code simplification
runner.py: made .config a cached_property
2015-05-07 22:02:40 +02:00
Anthony Sottile
931c69b3fa Simplify a few things 2015-01-14 19:26:38 -08:00
dongweiming
b707cbba06 Make pre_commit also support pre-push hook 2015-01-14 19:26:37 -08:00
Anthony Sottile
fd109b7745 reorder-python-imports 2015-01-04 15:49:19 -08:00
Anthony Sottile
d8d7893cf7 Add ability to pass filenames as arguments. 2014-09-16 17:27:40 -07:00
Anthony Sottile
ecf82ed5e0 Use bytes for sys.stdout.write in PY2. Closes #161. 2014-09-02 16:11:45 -07:00
Anthony Sottile
62f13aea56 Allow multiple hooks with same id in .pre-commit-config.yaml 2014-07-31 08:37:37 -07:00
Anthony Sottile
b8c8120f2a Print hookid on failure. 2014-07-22 06:54:48 -07:00
Anthony Sottile
cdfd3f7670 Move commands into their own files. 2014-06-13 19:52:14 -07:00