add schema bootstrap

This commit is contained in:
Jonathan Lundy 2020-06-13 10:40:01 -06:00
parent 73706cfdce
commit 8efd1feb80
No known key found for this signature in database
GPG key ID: C63E6D61F3035024
9 changed files with 28 additions and 3 deletions

View file

@ -148,8 +148,8 @@ class FileDOM:
@property
def schema(self) -> str:
"""return the schema name for file"""
if len(self.dom) < 0:
return "none"
if len(self.dom) < 1:
return None
return self.dom[0].key

View file

@ -62,6 +62,7 @@ def run(path: str = "."):
s = schemas.get(dom.rel)
if s is None:
print(f"{dom.src} schema not found for {dom.rel}")
continue
status = s.check_file(dom, lookups)
status.print()