mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
implement default_install_hook_types
this implements a configurable fallback for the default value of `pre-commit install`
This commit is contained in:
parent
934afb85a4
commit
fd0177ae3a
7 changed files with 86 additions and 55 deletions
|
|
@ -336,6 +336,11 @@ CONFIG_SCHEMA = cfgv.Map(
|
|||
'Config', None,
|
||||
|
||||
cfgv.RequiredRecurse('repos', cfgv.Array(CONFIG_REPO_DICT)),
|
||||
cfgv.Optional(
|
||||
'default_install_hook_types',
|
||||
cfgv.check_array(cfgv.check_one_of(C.HOOK_TYPES)),
|
||||
['pre-commit'],
|
||||
),
|
||||
cfgv.OptionalRecurse(
|
||||
'default_language_version', DEFAULT_LANGUAGE_VERSION, {},
|
||||
),
|
||||
|
|
@ -355,6 +360,7 @@ CONFIG_SCHEMA = cfgv.Map(
|
|||
cfgv.WarnAdditionalKeys(
|
||||
(
|
||||
'repos',
|
||||
'default_install_hook_types',
|
||||
'default_language_version',
|
||||
'default_stages',
|
||||
'files',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue