blob: 419031a9b90c093ce7f24705a9d6787d8ccd15ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
from __future__ import annotations
from typing 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
|