Anthony Sottile
5d767bbc49
Replace match.group(n) with match[n]
2020-01-12 13:39:53 -08:00
Anthony Sottile
9000e9dd41
Some manual .format() -> f-strings
2020-01-12 13:39:53 -08:00
Anthony Sottile
327ed924a3
Add types to pre-commit
2020-01-12 10:15:01 -08:00
Anthony Sottile
fa536a8693
mypy passes with check_untyped_defs
2020-01-12 09:27:04 -08:00
Anthony Sottile
30c1e8289f
upgrade hooks, pyupgrade pre-commit
2020-01-12 09:27:04 -08:00
Anthony Sottile
97e3371046
Remove deprecated pcre language
2020-01-05 13:58:44 -08:00
Anthony Sottile
35caf115f8
clear 'frozen: ...' comment if autoupdate unfreezes
2020-01-01 20:21:42 -08:00
Yngve Høiseth
d8b54ddf4a
Make URL clickable
...
I added a space after as well in order to make it look more balanced.
2020-01-01 15:27:27 +01:00
Anthony Sottile
0c0427bfbd
Add duration to verbose run
2019-12-28 18:20:10 -08:00
Anthony Sottile
8a3c740f9e
Implement pre-commit autoupdate --freeze
2019-12-28 13:07:39 -08:00
Anthony Sottile
01a628d96d
Make verbose output less special
2019-12-23 15:51:58 -08:00
Anthony Sottile
6af0e33eed
Add top-level files key for inclusion
2019-12-23 12:04:05 -08:00
Anthony Sottile
54359fff39
Bump the version of pre-commit-hooks in sample-config
2019-10-28 15:21:28 -07:00
Anthony Sottile
707407dd49
Normalize paths on windows to forward slashes
2019-10-19 14:45:23 -07:00
Anthony Sottile
7c3404ef1f
show color in hook outputs when attached to a tty
2019-10-12 23:17:36 -07:00
Anthony Sottile
2633d38a63
Fix ordering of mixed stdout / stderr printing
2019-10-12 13:35:04 -07:00
Anthony Sottile
f612aeb22b
Split out cmd_output_b
2019-10-06 15:16:47 -07:00
Anthony Sottile
a18646deb2
Allow --hook-type to be specified multiple times
2019-09-23 11:14:36 -07:00
Anthony Sottile
f48c0abcbe
Use expanduser in init-templatedir like git does
2019-08-03 13:30:13 -07:00
Anthony Sottile
cab8036db3
Don't treat unset init.templateDir as the current directory
2019-08-03 11:55:53 -07:00
Anthony Sottile
1bd9bfefeb
Merge pull request #1090 from pre-commit/template_dir
...
Implement `pre-commit init-templatedir`
2019-07-20 20:56:02 -07:00
Anthony Sottile
9a52eefc99
Implement pre-commit init-templatedir
2019-07-20 20:33:42 -07:00
Anthony Sottile
8be0f857e8
Make autoupdate work for non-master default branches
2019-07-20 15:30:30 -07:00
Anthony Sottile
73250ff4e3
Fix autoupdate to always use non-shallow clone
2019-07-20 14:59:49 -07:00
Michael Adkins
02d95c033c
Fixed code style
2019-07-09 13:48:06 -05:00
Michael Adkins
c148845a98
Added hook-stage print to output for missing hook id
2019-07-09 13:06:18 -05:00
Mandar Vaze
3d7b374bef
Pass correct value to git color based on args.color
2019-06-01 17:33:27 +05:30
Mandar Vaze
64f0178b75
Pass color option to git diff unconditionally
2019-06-01 07:40:20 +05:30
Mandar Vaze
4f4767c9e0
Pass color option to git diff (on failure)
...
Fixes #1007
2019-05-31 16:42:16 +05:30
Anthony Sottile
af2c6de9ae
Fix double legacy install on windows
2019-04-27 15:10:01 -07:00
Marc Jay
82969e4ba3
Use set rather than list for commit message related stages, remove
...
default file open modes, tidy up bash call for failing hook test
2019-04-21 21:58:01 +01:00
Marc Jay
e60f541559
Adds support for prepare-commit-msg hooks
...
Adds a prepare-commit-msg hook stage which allows for hooks which add
dynamic suggested/placeholder text to commit messages that an author can
use as a starting point for writing a commit message
2019-04-21 21:07:13 +01:00
Anthony Sottile
668e6415c0
Adjust messaging slightly
2019-03-30 14:05:24 -07:00
Ben Norquist
71a740d65d
add helpful message and test
2019-03-30 14:00:03 -07:00
Artem Polishchuk
9f0cfed600
Specify env python explicitly.
2019-03-30 19:56:52 +02:00
Anthony Sottile
dc28922ccb
Run pre-commit autoupdate
...
Committed via https://github.com/asottile/all-repos
2019-03-21 21:09:33 -07:00
DanielChabrowski
7023caba94
Execute with xargs in try_repo
2019-03-19 20:35:52 +01:00
Anthony Sottile
a18b683d12
Add review suggestion
...
Co-Authored-By: DanielChabrowski <dantezstudio@gmail.com >
2019-03-18 02:31:47 +01:00
DanielChabrowski
888787fb2d
Fix try-repo for staged untracked changes
2019-03-18 02:04:50 +01:00
Jesse Bona
f2be2ead35
Update migrate_config.py
...
Corrected loop condition to not run if configuration file only contains new lines.
2019-02-02 10:34:53 +11:00
Jesse Bona
7b491c7110
Update migrate_config.py
...
Added if statement to prevent looping through header lines if configuration file is empty
2019-02-01 19:15:59 +11:00
Anthony Sottile
b1389603e0
Speed up filename filtering.
...
Before there was a `getcwd` syscall for every filename which was filtered.
Instead this is now cached per-run.
- When all files are identified by filename only: ~45% improvement
- When no files are identified by filename only: ~55% improvement
This makes little difference to overall execution, the bigger win is
eliminating the `memoize_by_cwd` hack. Just removing the memoization would
have *increased* the runtime by 300-500%.
2019-01-23 20:48:41 -08:00
Anthony Sottile
4f8a9580aa
Be more timid about choosing a shebang
2019-01-10 14:26:55 -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
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
4f9d0397b5
Add more 'no cover windows' comments
2018-12-31 14:06:10 -08:00
Anthony Sottile
c577ed92e7
Refactor pre_commit.repository and factor out cached-property
2018-12-30 20:56:49 -08:00
Pedro Algarvio
8ffd1f69d7
Address review comments
2018-12-27 17:18:11 +00:00