mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
fix check-useless-excludes for exclude of broken symlink
This commit is contained in:
parent
a96bb23caf
commit
35d3ed40cd
2 changed files with 25 additions and 0 deletions
|
|
@ -43,6 +43,9 @@ def check_useless_excludes(config_file: str) -> int:
|
|||
|
||||
for repo in config['repos']:
|
||||
for hook in repo['hooks']:
|
||||
# the default of manifest hooks is `types: [file]` but we may
|
||||
# be configuring a symlink hook while there's a broken symlink
|
||||
hook.setdefault('types', [])
|
||||
# Not actually a manifest dict, but this more accurately reflects
|
||||
# the defaults applied during runtime
|
||||
hook = apply_defaults(hook, MANIFEST_HOOK_DICT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue