diff --git a/planemo/lint.py b/planemo/lint.py index 92aa560d6..d799d50b8 100644 --- a/planemo/lint.py +++ b/planemo/lint.py @@ -109,11 +109,11 @@ def is_doi(publication_id, lint_ctx): def lint_xsd(lint_ctx, schema_path, path): """Lint XML at specified path with supplied schema.""" - name = os.path.basename(path) + name = lint_ctx.object_name or os.path.basename(path) validator = validation.get_validator(require=True) validation_result = validator.validate(schema_path, path) if not validation_result.passed: - msg = "Invalid %s found. Errors [%s]" + msg = "Invalid XML found in file: %s. Errors [%s]" msg = msg % (name, validation_result.output) lint_ctx.error(msg) else: diff --git a/planemo/tool_lint.py b/planemo/tool_lint.py index 81a50fa55..63a6283f8 100644 --- a/planemo/tool_lint.py +++ b/planemo/tool_lint.py @@ -1,5 +1,7 @@ from __future__ import absolute_import +from os.path import basename + from galaxy.tools.lint import lint_tool_source from planemo.exit_codes import ( @@ -28,7 +30,7 @@ def lint_tools_on_path(ctx, paths, lint_args, **kwds): exit_codes.append(EXIT_CODE_GENERIC_FAILURE) continue info("Linting tool %s" % tool_path) - if not lint_tool_source(tool_xml, **lint_args): + if not lint_tool_source(tool_xml, name=basename(tool_path), **lint_args): error("Failed linting") exit_codes.append(EXIT_CODE_GENERIC_FAILURE) else: