Anthony Sottile
bea33af310
small cleanups in tests
2019-01-06 12:08:52 -08:00
Anthony Sottile
bd65d8947f
Implement default_stages
2019-01-06 10:32:58 -08:00
Anthony Sottile
d3b5a41830
Implement default_language_version
2019-01-05 13:15:23 -08:00
Anthony Sottile
fc84567923
Default local / meta through cfgv
2019-01-05 08:31:03 -08:00
Anthony Sottile
9e34e6e316
pre-commit gc
2019-01-02 19:07:23 -08:00
Anthony Sottile
e4f0b4c1b7
Only configure logging inside the context
2019-01-01 15:01:37 -08:00
Anthony Sottile
bdc58cc33f
Teach pre-commit try-repo to clone uncommitted changes
2019-01-01 15:01:36 -08:00
Anthony Sottile
4da461d90a
Fix try-repo relpath while in a sub-directory
2019-01-01 11:57:06 -08:00
Anthony Sottile
4f9d0397b5
Add more 'no cover windows' comments
2018-12-31 14:06:10 -08:00
Anthony Sottile
b59d7197ff
Use Hook api in languages
2018-12-31 13:16:48 -08:00
Anthony Sottile
e4cf5f321b
just use normal dicts in tests
2018-12-31 11:15:22 -08:00
Anthony Sottile
c577ed92e7
Refactor pre_commit.repository and factor out cached-property
2018-12-30 20:56:49 -08:00
Anthony Sottile
a49a34ef3d
Add identity meta hook
2018-12-29 13:13:31 -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
d46bbc486f
Use in_git_dir in more places
2018-12-27 18:25:54 -08:00
Anthony Sottile
2af0b0b4f3
better no-cover for windows
2018-12-27 18:25:52 -08:00
Anthony Sottile
6d40b2a38b
Simplify the skip test to only test skipping
2018-12-27 09:24:41 -08:00
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
Chris Kuehl
45e3dab00d
Shuffle arguments before running hooks
2018-11-19 17:53:19 -08:00
Anthony Sottile
e15d7cde86
Upgrade the sample config
2018-11-15 14:17:10 -08:00
Anthony Sottile
dc84f21dd4
Merge pull request #857 from runz0rd/master
...
Reraises InvalidManifestError as RepositoryCannotBeUpdatedError
2018-11-14 17:29:43 -08:00
Milos Pejanovic
bf8c8521cd
Added a test and small change for error output
2018-11-14 00:43:04 +01:00
Chris Kuehl
9125439c3a
Force serial hook runs during tests
2018-10-24 16:33:06 -07:00
Chris Kuehl
aa50a8cde0
Switch to using concurrent.futures
2018-10-24 16:33:06 -07:00
Chris Kuehl
231f6013bb
Allow more time on the concurrency test
...
Spawning processes is apparently really slow on Windows, and the test is
occasionally taking slightly more than a second on AppVeyor. I think we
can allow up to the full 2.5 seconds without losing the valuable bits of
the test.
2018-10-24 16:33:06 -07:00
Chris Kuehl
b6926e8e2e
Attempt to partition files to use all possible cores
2018-10-24 16:33:06 -07:00
Chris Kuehl
ec0ed8aef5
Handle CPU detection errors and running on Travis
2018-10-24 16:16:13 -07:00
Chris Kuehl
ba5e27e4ec
Implement concurrent execution of individual hooks
2018-10-24 16:16:10 -07:00
Anthony Sottile
1f1cd2bc39
Merge pull request #839 from georgeyk/refactor-xargs-partition
...
Update xargs.partition with platform information
2018-10-23 22:55:30 -07:00
Anthony Sottile
ead906aed0
Compute win32 python2 length according to encoded size
2018-10-23 22:02:48 -07:00
Anthony Sottile
6cde287a1e
Install multi-hook repositories only once
2018-10-23 10:28:37 -07:00
Anthony Sottile
fcdd638134
Merge pull request #847 from pre-commit/improve_coverage
...
Improve coverage of check_hooks_apply
2018-10-14 16:28:32 -07:00
Anthony Sottile
8e8b962266
Improve coverage of check_hooks_apply
2018-10-14 15:00:57 -07:00
Anthony Sottile
9f60561d6f
Replace resources with importlib_resources
2018-10-14 14:37:35 -07:00
Anthony Sottile
ebe5132576
Replace pkg_resources.get_distribution with importlib-metadata
2018-10-14 12:24:59 -07:00
Anthony Sottile
3181b461aa
fix pushing to new branch not identifying all commits
2018-10-10 20:08:16 -07:00
George Y. Kussumoto
3d573d8736
Fix xargs.partion: win32 test
2018-10-09 23:32:46 -03:00
George Y. Kussumoto
c9e297ddb6
Fix xargs.partition: win32 new string length computation
2018-10-09 22:54:41 -03:00
George Y. Kussumoto
2560280d21
Fix xargs.partition tests: explicity set unicode chars
2018-10-08 19:42:59 -03:00
George Y. Kussumoto
bb6b1c33ae
Remove pytest-mock
2018-10-06 19:57:30 -03:00
George Y. Kussumoto
2ad69e12ce
Fix xargs.partition: use sys.getfilesystemencoding
...
The previous `sys.getdefaultencoding` almost always fallsback to
`ascii` while `sys.getfilesystemencoding` is utf-8 once in utf-8 mode.
2018-10-05 16:39:49 -03:00
George Y. Kussumoto
df5d171cd7
Fix xargs.partition tests in python2.7 (pytest-mock)
2018-10-05 14:33:32 -03:00
George Y. Kussumoto
fa4c03da65
Update xargs.partition with platform information
...
Change how xargs.partition computes the command length (including
arguments) depending on the plataform.
More specifically, 'win32' uses the amount of characters while posix
system uses the byte count.
2018-10-05 11:54:31 -03:00
George Y. Kussumoto
1b496c5fc3
Fix check-useless-exclude to consider types filter
2018-10-02 12:17:46 -03:00