Add identity meta hook · precommit/pre-commit@a49a34e · GitHub
Skip to content

Commit a49a34e

Browse files
committed
Add identity meta hook
1 parent d2b92e8 commit a49a34e

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

pre_commit/meta_hooks/identity.py

Lines changed: 13 additions & 0 deletions

pre_commit/repository.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def manifest_hooks(self):
237237
# The hooks are imported here to prevent circular imports.
238238
from pre_commit.meta_hooks import check_hooks_apply
239239
from pre_commit.meta_hooks import check_useless_excludes
240+
from pre_commit.meta_hooks import identity
240241

241242
def _make_entry(mod):
242243
"""the hook `entry` is passed through `shlex.split()` by the
@@ -260,6 +261,13 @@ def _make_entry(mod):
260261
'language': 'system',
261262
'entry': _make_entry(check_useless_excludes),
262263
},
264+
{
265+
'id': 'identity',
266+
'name': 'identity',
267+
'language': 'system',
268+
'verbose': True,
269+
'entry': _make_entry(identity),
270+
},
263271
]
264272

265273
return {

tests/meta_hooks/identity_test.py

Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)