mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
18 lines
377 B
Python
18 lines
377 B
Python
from __future__ import annotations
|
|
|
|
from collections.abc import Sequence
|
|
|
|
from pre_commit import clientlib
|
|
|
|
|
|
def validate_manifest(filenames: Sequence[str]) -> int:
|
|
ret = 0
|
|
|
|
for filename in filenames:
|
|
try:
|
|
clientlib.load_manifest(filename)
|
|
except clientlib.InvalidManifestError as e:
|
|
print(e)
|
|
ret = 1
|
|
|
|
return ret
|