Commit Graph

153 Commits

Author SHA1 Message Date
Pedro Algarvio
8ffd1f69d7 Address review comments 2018-12-27 17:18:11 +00:00
Pedro Algarvio
79c8b1fceb Allow hook alias to be used in SKIP. Includes test. 2018-12-27 12:03:27 +00:00
Pedro Algarvio
5840f880a9 Address review comments and test failures 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
Anthony Sottile
de942894ff Pick a better python shebang for hook executable 2018-12-25 12:11:02 -08:00
Anthony Sottile
e15d7cde86 Upgrade the sample config 2018-11-15 14:17:10 -08:00
Anthony Sottile
aaa3976a29 Use text_type instead of str() 2018-11-13 17:23:32 -08:00
Milos Pejanovic
e339de22d7 Added requested changes 2018-11-14 01:59:18 +01:00
Milos Pejanovic
bf8c8521cd Added a test and small change for error output 2018-11-14 00:43:04 +01:00
Milos Pejanovic
1c97d3f5fd Added a try except block which reraises InvalidManifestError as RepositoryCannotBeUpdatedError 2018-10-31 17:39:47 +01:00
Anthony Sottile
9f60561d6f Replace resources with importlib_resources 2018-10-14 14:37:35 -07:00
Anthony Sottile
72d10903d5 Update config 2018-08-15 17:55:06 -07:00
Mickaël Schoentgen
67d6fcb0f6 Fix several ResourceWarning: unclosed file 2018-08-10 18:30:22 +02:00
Matt Layman
fd1bc21d8e Use parens instead of different logic pattern. 2018-07-19 23:27:29 -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
c947a0935d Fix buffering in --show-diff-on-failure 2018-07-17 18:24:16 -07:00
Anthony Sottile
bffa58753d hook paths are only computed in install_uninstall 2018-07-05 12:49:01 -07:00
Anthony Sottile
c3e438379a Appease yaml.load linters
_technically_ yaml.load is unsafe, however the contents being loaded here are
previously loaded just above using a safe loader so this is not an abitrary
code vector.  Fixing it nonetheless :)
2018-07-03 05:12:36 -07:00
Anthony Sottile
c01ffc83f8 Separate store from runner 2018-06-29 22:35:53 -07:00
Anthony Sottile
6d683a5fac clean: separate store from runner 2018-06-29 20:08:23 -07:00
Anthony Sottile
0e430be0ce autoupdate: separate store from runner 2018-06-29 20:04:16 -07:00
Anthony Sottile
5b6a5abae9 Consistent ordering of filenames 2018-06-11 12:49:45 -07:00
Anthony Sottile
96e9d1b758 Restore git 1.8 support 2018-03-12 14:36:07 -07:00
Anthony Sottile
f679983012 Refuse to install with core.hooksPath set 2018-03-03 15:24:14 -08:00
Anthony Sottile
5651c66995 Migrate sha -> rev 2018-02-24 20:19:39 -08:00
Anthony Sottile
184e22e81f Merge pull request #714 from pre-commit/remove_cwd_fn
Move cwd() to tests-only
2018-02-24 17:44:45 -08:00
Anthony Sottile
86da772fd2 Merge pull request #713 from pre-commit/update_many_repos
Allow autoupdate --repo to be specified multiple times
2018-02-24 17:04:18 -08:00
Anthony Sottile
29033f10ca Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
Anthony Sottile
f76d3c4f95 Allow autoupdate --repo to be specified multiple times 2018-02-24 15:42:26 -08:00
Anthony Sottile
b827694520 Each set of additional dependencies gets its own env 2018-02-24 15:28:43 -08:00
Anthony Sottile
bdad930d71 Move pre_commit.schema to cfgv library 2018-02-18 15:25:53 -08:00
Anthony Sottile
5c90c1a68f Rewrite the hook template in python 2018-02-03 22:51:00 -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
5a4dc0ce30 https-ify links
- A lot of http links loaded fine on https
- pre-commit.com is now loadable on https via cloudflare
2018-01-13 18:17:54 -08:00
Anthony Sottile
d5dcebf671 Deprecate the pcre language 2018-01-13 17:28:19 -08:00
Anthony Sottile
df38e1010b Remove unused import 2018-01-09 08:49:42 -08:00
Iulian Onofrei
81df782c20 Update unstaged config file error message 2018-01-09 18:10:05 +02:00
Iulian Onofrei
8407b92b18 Replace string literals with constants 2018-01-09 17:51:41 +02:00
Anthony Sottile
029ccc47c8 Invoke git diff without a pager 2018-01-07 20:56:17 -08:00
Kevin Hock
090030447d Combine blocks 2017-11-08 17:05:34 -08:00
Kevin Hock
dfb058f15f Edit comment again 2017-11-08 15:55:05 -08:00
Kevin Hock
e4f28a2193 Edit comment 2017-11-08 15:53:08 -08:00
Kevin Hock
54ccb65a09 Add existing repo_config to output_repos 2017-11-08 15:50:04 -08:00
Kevin Hock
4d0c400066 Add repo option to autoupdate 2017-11-06 17:19:06 -08:00
Anthony Sottile
5a8ca2ffbe Some minor fixups 2017-10-30 09:12:48 -07:00
Anthony Sottile
84b1ba520d Remove Manifest, no longer a useful abstraction 2017-10-26 16:17:52 -07:00
Anthony Sottile
10912fa03e Lazily install repositories 2017-10-20 13:04:33 -07: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
18c9e061d8 Small cleanups 2017-09-30 15:53:44 -07:00