helly25
689f1203f7
When run is called with -v, then show hook.description if available.
...
When developers run the pre-commit, they don't always understand what to or where to find more information. The hook description field is already present and often used to provide more descriptive information. For brevity this is not shown in normal cases, but this PR changes the tool behavior to show the description in verbose mode (`-v`). So most users won't see any difference but this can easily be enabled for people who want it.
Alternatives considered:
* Always show the description: Some people may not like this though as it can be spammy.
* Provide a new field: Possible but seems to be just more work with description already present and not otherwise used.
* Show the `repo` link. This is at the wrong level and has a slightly different purpose. Though description can just be set to the same url where that is correct.
2024-04-25 09:10:44 +00:00
Anthony Sottile
fc622159a6
fix per-hook fail_fast to not fail on previous failures
2024-03-24 13:17:00 -04:00
Anthony Sottile
7f15dc75ee
python3.9+
2023-10-28 14:20:37 -04:00
Anthony Sottile
c9945b9aa3
Merge pull request #3029 from adamchainz/improve_duration_timing
...
Improve hook duration timing
2023-10-13 11:49:53 -04:00
Adam Johnson
d988767b41
Improve hook duration timing
2023-10-13 16:40:30 +01:00
Max R
5d692d7e06
Short-circuit hooks
2023-09-11 19:41:40 -04:00
Marcelo Galigniana
f39154f69f
Add pre-rebase hook support
2023-03-11 15:17:42 -05:00
Anthony Sottile
e3e17a1617
make --hook-type and stages match
2023-03-11 14:26:14 -05:00
Adam Johnson
7783a3e63a
Add --no-textconv to git diff calls
2023-02-03 15:56:11 +00:00
marsha
84b38f7b89
Change cmd_output_bs retcode arg to a boolean check
2022-10-30 14:49:42 -05:00
Anthony Sottile
2405caa352
allow pre-commit run --files ... against unmerged files
2022-08-15 13:46:17 -04:00
Mark Korondi
587c6b97e7
respect aliases in SKIP when installing environments
2022-08-11 09:30:39 +02:00
Matt Whitaker
702ebf402c
Expose prepare-commit-msg arguments as environment vars
2022-06-11 14:25:55 -04:00
Anthony Sottile
04de6a2e57
drop python 3.6 support
...
python 3.6 reached end of life on 2021-12-23
2022-01-18 18:44:20 -05:00
Stojan Nedic
63ae399db0
Add fail_fast support per-hook
2021-10-22 19:16:30 -04:00
Jordan Speicher
4cd8b364dd
Add: post-rewrite hook support
2021-09-01 14:50:59 -05:00
Florent Clarret
584fd585ec
Expose local branch ref as an environment variable
2021-06-19 18:18:14 +02:00
Anthony Sottile
3922263f8c
Use more inclusive language
...
Committed via https://github.com/asottile/all-repos
2021-05-14 19:11:05 -07:00
Anthony Sottile
12a7075fda
skip installation for SKIP'd hooks
2021-04-10 00:37:59 -07:00
Paweł Sacawa
6b73138c73
Add: post-merge hook support
2021-02-23 19:00:02 -08:00
surafelabebe
cb5ed6276d
Expose remote branch ref as an environment variable
2021-01-22 13:18:25 -08:00
Anthony Sottile
e6c9b04386
fix symlink test for windows
2020-11-26 09:42:27 -08:00
Anthony Sottile
89ab609732
fix the default value for types_or
2020-11-25 18:21:37 -08:00
Marco Gorelli
62f668fc3f
add types_or
2020-11-02 17:25:10 +00:00
Anthony Sottile
24dfeed89c
Replace EnvironT with MutableMapping[str, str]
2020-10-28 13:00:25 -07:00
Anthony Sottile
5fb721f7a7
normalize slashes even earlier on windows for filenames
2020-06-08 14:53:27 -07:00
Chad Larson
9e0b4a9d4d
pre-commit env var exposed
2020-05-23 17:20:26 -05:00
Dom
928938a6a1
fix hooks firing during staged_files_only
2020-05-02 14:00:21 -07:00
zjeuhpiung liu
605b39f617
fix CJK characters width in output
2020-03-28 08:06:49 -07:00
Anthony Sottile
1b93e26b58
Fix test coverage
2020-02-23 14:53:03 -08:00
Anthony Sottile
d35b00352f
Make more readable --from-ref / --to-ref aliases for --source / --origin
2020-02-23 11:07:57 -08:00
Anthony Sottile
566f1afcd4
Merge pull request #1339 from andrewhare/andrewhare/post-checkout
...
Add post-checkout
2020-02-23 10:39:28 -08:00
Andrew Hare
18fa004254
Add post-checkout
2020-02-23 10:22:18 -08:00
Joey Espinosa
5258dce73b
fix: catch missing arg if using {prepare-}commit-msg stage
...
If using the prepare-commit-msg and commit-msg stages specifically (such
as with the try-repo command), the `--commit-msg-filename` arg must be
provided.
[fixes #1336 ]
chore: improve error message for hook stage check
2020-02-23 10:15:59 -08:00
Anthony Sottile
0bb8a8fabe
Move test to install_uninstall test so environment variables apply
2020-01-16 13:02:20 -08:00
David Martinez Barreiro
57cc814b8b
Push remote env var details
2020-01-16 12:35:04 -08:00
Anthony Sottile
df40e862f4
More miscellaneous cleanup
2020-01-13 11:47:34 -08:00
Anthony Sottile
251721b890
os.symlink is always an attribute in py3
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
ab19b94811
some manual py2 cleanups
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
0c0427bfbd
Add duration to verbose run
2019-12-28 18:20:10 -08:00
Anthony Sottile
4941ed58d5
Normalize crlf in tests
2019-12-23 18:27:30 -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
707407dd49
Normalize paths on windows to forward slashes
2019-10-19 14:45:23 -07:00
Anthony Sottile
a18646deb2
Allow --hook-type to be specified multiple times
2019-09-23 11:14:36 -07:00
Anthony Sottile
d3474dfff3
make the tests not depend on flake8 being installed
2019-08-28 11:41:03 -07:00
Michael Adkins
02d95c033c
Fixed code style
2019-07-09 13:48:06 -05:00