Commit Graph

44 Commits

Author SHA1 Message Date
Anthony Sottile
9e34e6e316 pre-commit gc 2019-01-02 19:07:23 -08:00
Anthony Sottile
bdc58cc33f Teach pre-commit try-repo to clone uncommitted changes 2019-01-01 15:01:36 -08:00
Anthony Sottile
e4cf5f321b just use normal dicts in tests 2018-12-31 11:15:22 -08:00
Anthony Sottile
160a11a0a7 Improve git_commit helper 2018-12-28 15:32:25 -08:00
Pedro Algarvio
28c97a95cd Don't fail if GPG signing is configured by default. All references. 2018-12-28 20:11:37 +00:00
Anthony Sottile
15b1f118b5 Update fixtures.py 2018-12-14 13:14:13 -08:00
Pedro Algarvio
afeac2f099 Don't fail if GPG signing is configured by default 2018-12-14 11:45:01 +00:00
Anthony Sottile
9f60561d6f Replace resources with importlib_resources 2018-10-14 14:37:35 -07:00
Mickaël Schoentgen
67d6fcb0f6 Fix several ResourceWarning: unclosed file 2018-08-10 18:30:22 +02:00
Anthony Sottile
96e9d1b758 Restore git 1.8 support 2018-03-12 14:36:07 -07:00
Anthony Sottile
5651c66995 Migrate sha -> rev 2018-02-24 20:19:39 -08:00
Anthony Sottile
29033f10ca Move cwd() to tests-only 2018-02-24 16:44:59 -08:00
Anthony Sottile
bdad930d71 Move pre_commit.schema to cfgv library 2018-02-18 15:25:53 -08:00
Iulian Onofrei
8407b92b18 Replace string literals with constants 2018-01-09 17:51:41 +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
e9509306d8 Implement pygrep language as a replacement for pcre 2017-09-22 22:31:30 -07:00
Anthony Sottile
989bcfe9ca Use file:// protocol for cloning under test 2017-09-22 10:38:19 -07:00
Anthony Sottile
3e76cdaf25 Enable map configurations (config v2). 2017-09-06 10:01:08 -07:00
Anthony Sottile
8f86f8f156 Merge pull request #553 from pre-commit/remove_legacy_hooks_yaml_support
Remove legacy 'hooks.yaml' file support
2017-07-26 05:50:41 -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
86d9ca053b Remove legacy 'hooks.yaml' file support 2017-07-13 10:29:36 -07:00
Anthony Sottile
0c70fa4229 Use asottile/add-trailing-comma 2017-07-12 18:30:51 -07:00
Anthony Sottile
cb8dd335f4 Replace jsonschema with better error messages 2017-03-08 14:07:00 -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
f000241dcb Local repositories clone a blank repo 2017-02-15 15:36:53 -08:00
Anthony Sottile
7e512004d6 Remove pre_commit.ordereddict module 2017-01-30 08:21:34 -08:00
Anthony Sottile
b9e5184ebd Introduce .pre-commit-hooks.yaml as a replacement for hooks.yaml 2017-01-21 13:47:59 -08:00
Jacob Scott
727247e6ed Add tests for alternate config 2016-12-02 16:25:10 -08:00
Anthony Sottile
be4d0a2742 Add a helper to modify config files under test 2015-12-09 15:12:36 -08:00
Anthony Sottile
ce307a16e0 Add an option to require a specific pre-commit version 2015-12-06 20:54:07 -08:00
Anthony Sottile
1dfcf10036 git grep -l tmpdir_factory | xargs sed -i 's/tmpdir_factory/tempdir_factory/g' 2015-10-01 10:24:54 -07:00
Lucas Cimon
3c02a24655 Fixing bug with local hooks that disappeared during autoupdate 2015-06-14 22:30:28 +02:00
Lucas Cimon
b575cb510c Fix #238 : pre-commit autoupdate fails with local hooks 2015-06-02 23:30:06 +02:00
Lucas Cimon
b68261c720 Adding support for locally-defined hooks 2015-05-10 23:57:34 +02:00
Anthony Sottile
fd109b7745 reorder-python-imports 2015-01-04 15:49:19 -08:00
Anthony Sottile
bbd2572b11 Remove plumbum 2014-10-02 06:59:37 -07:00
Anthony Sottile
22ee10d4ad Update .pre-commit-config.yaml 2014-08-22 12:33:54 -07:00
Anthony Sottile
5575dbae05 Use aspy.yaml instead. 2014-06-17 09:29:39 -07:00
Anthony Sottile
a984a02c84 Make ordereddict a direct dependency. 2014-06-17 06:59:13 -07:00
Anthony Sottile
4b43fd8cdc Add integration test for existing install behaviour 2014-06-16 12:53:26 -07:00
Anthony Sottile
85a76617c1 Refactor fixtures in tests. 2014-06-15 18:49:45 -07:00
Anthony Sottile
3baefd57e2 Convert autoupdate_test to use new fixture functions. 2014-06-15 17:00:35 -07:00
Anthony Sottile
047a933554 Move empty_git_dir out of pytest fixtures. 2014-06-15 15:47:11 -07:00