Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/planemo/lint.py @ 0:d67268158946 draft
planemo upload commit a3f181f5f126803c654b3a66dd4e83a48f7e203b
author | bcclaywell |
---|---|
date | Mon, 12 Oct 2015 17:43:33 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d67268158946 |
---|---|
1 import os | |
2 | |
3 from planemo.xml import validation | |
4 | |
5 | |
6 def lint_xsd(lint_ctx, schema_path, path): | |
7 name = os.path.basename(path) | |
8 validator = validation.get_validator(require=True) | |
9 validation_result = validator.validate(schema_path, path) | |
10 if not validation_result.passed: | |
11 msg = "Invalid %s found. Errors [%s]" | |
12 msg = msg % (name, validation_result.output) | |
13 lint_ctx.error(msg) | |
14 else: | |
15 lint_ctx.info("%s found and appears to be valid XML" % name) |