Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions planemo/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion planemo/tool_lint.py
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down Expand Up @@ -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:
Expand Down