Pedro Algarvio
79c8b1fceb
Allow hook alias to be used in SKIP. Includes test.
2018-12-27 12:03:27 +00:00
Pedro Algarvio
b096c0b8f2
Allow aliasing a hook and calling it by it's alias
2018-12-27 12:03:27 +00:00
Anthony Sottile
fe409f1a43
Remove stateful Runner
2018-12-26 22:33:21 -08:00
Matt Layman
a8b298799c
Check bytes for Python 3.
2018-07-19 22:11:15 -04:00
Matt Layman
4640dc7b4a
Run only the specified hook even when stages exist in config.
...
This branches fixes the run logic so that when
`pre-commit run some_hook -a` runs when the config contains
`stages: ['commit']` for some other hook, only the hook specified as an
argument will run.
Fixes #772
2018-07-19 21:45:43 -04:00
Anthony Sottile
c01ffc83f8
Separate store from runner
2018-06-29 22:35:53 -07:00
Anthony Sottile
5b6a5abae9
Consistent ordering of filenames
2018-06-11 12:49:45 -07:00
Anthony Sottile
f88e007f52
Fix test since pip 10 changed output
2018-05-21 21:38:36 -07:00
Anthony Sottile
d9d5b1cef1
Fix typo
2018-03-12 14:34:53 -07:00
Anthony Sottile
bf5792eb10
Add a manual stage for cli-only interaction
2018-03-07 12:41:25 -08:00
Anthony Sottile
4088f55ee6
Don't need a shell here
2018-03-07 12:18:54 -08:00
Anthony Sottile
29033f10ca
Move cwd() to tests-only
2018-02-24 16:44:59 -08:00
Bastien Gérard
b319d6f80c
Add a hook option that allows stdout to be printed when exit code is 0 ( #695 )
2018-02-01 12:21:19 +01:00
Anthony Sottile
0f54fedac9
Replace deprecated yield_fixture with fixture
...
Committed via https://github.com/asottile/all-repos
2018-01-21 15:31:17 -08:00
Anthony Sottile
d5dcebf671
Deprecate the pcre language
2018-01-13 17:28:19 -08:00
Anthony Sottile
2255d8484e
Update message for unstaged config in test
2018-01-09 08:15:27 -08:00
Paul Hooijenga
9db827ef9d
Refactor meta hooks
2017-10-28 13:59:11 +02:00
Paul Hooijenga
8a0dd01c7e
Implement check-files-matches-any meta hook
2017-10-25 10:09:44 +02:00
Paul Hooijenga
8df11ee7aa
Implement check-useless-excludes meta hook
2017-10-25 10:09:43 +02:00
Paul Hooijenga
88c676a7c1
Add support for meta hooks
2017-10-22 16:40:19 +02:00
Anthony Sottile
2c88791a7f
Add pre-commit try-repo
...
`try-repo` is useful for:
- Trying out a remote hook repository without needing to configure it.
- Testing a hook repository while developing it.
2017-10-07 18:03:52 -07:00
Anthony Sottile
ecdc22ce80
Implement global exclude
2017-09-10 15:09:44 -07:00
Anthony Sottile
6af60158ec
Refactor filename collection for hooks
2017-09-09 22:07:27 -07:00
Anthony Sottile
898a3ea1bb
Implement fail_fast.
2017-09-08 13:19:00 -07:00
Anthony Sottile
3e76cdaf25
Enable map configurations (config v2).
2017-09-06 10:01:08 -07:00
Anthony Sottile
6141c419ee
Remove Runner.cmd_runner and Store.cmd_runner
2017-09-05 14:49:31 -07:00
Anthony Sottile
0815108242
Handle non-ascii filenames from git
2017-09-05 08:10:16 -07:00
Anthony Sottile
6793fd8e5d
Remove --no-stash and --allow-unstaged-config
2017-08-23 11:16:37 -07:00
Anthony Sottile
d0b268c813
Add support for commit-msg git hook
2017-07-23 20:50:25 -07:00
Anthony Sottile
be3fbdf94e
Upgrade add-trailing-comma to 0.4.0
2017-07-15 12:32:36 -07:00
Anthony Sottile
0c70fa4229
Use asottile/add-trailing-comma
2017-07-12 18:30:51 -07:00
Anthony Sottile
05a108efe1
Implement exclude_types
2017-07-02 19:08:33 -07:00
Anthony Sottile
a58d99ac40
Implement types filtering
2017-07-02 18:51:23 -07:00
André Berti Sassi
7259135d19
Fix string literal type for Python 3
2017-05-13 20:12:16 -03: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
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
7e512004d6
Remove pre_commit.ordereddict module
2017-01-30 08:21:34 -08:00
Anthony Sottile
ba75867c93
py27+ syntax improvements
2017-01-21 11:49:53 -08:00
Jacob Scott
727247e6ed
Add tests for alternate config
2016-12-02 16:25:10 -08:00
Jacob Scott
f205e6d170
Incoroporate PR feedback
...
* Make config_file a required argument to Runner
* Update main.py
* Update tests to make them all green
New test to test alternate config functionality coming in next commit
2016-12-02 13:53:59 -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
b61a0b5467
added test for git forward diff
2016-06-01 15:49:44 +05:30
Anthony Sottile
efe33ffe5c
We're not using pylint
2016-05-20 16:14:18 -07:00
Anthony Sottile
57638134e3
Make a helper for running pre-commit as a subprocess under test
2016-02-07 13:03:59 -08:00
Anthony Sottile
e2451109f7
norm slashes for windows
2016-02-07 13:03:28 -08:00