Permalink
Browse files

Warn on unknown command attributes (anything but interpreter).

  • Loading branch information...
jmchilton committed Apr 15, 2015
1 parent 48ff49e commit 4f6102500a4e06f0d967dfc632af107cf98f1c82
Showing with 12 additions and 1 deletion.
  1. +12 −1 planemo_ext/galaxy/tools/linters/command.py
@@ -15,4 +15,15 @@ def lint_command(tool_xml, lint_ctx):
if "TODO" in command:
lint_ctx.warn("Command template contains TODO text.")

lint_ctx.info("Tool contains a command.")
command_attrib = command.attrib
interpreter_type = None
for key, value in command_attrib.items():
if key == "interpreter":
interpreter_type = value
else:
lint_ctx.warn("Unknown attribute [%s] encountered on command tag." % key)

interpreter_info = ""
if interpreter_type:
interpreter_info = " with interpreter of type [%s]" % interpreter_type
lint_ctx.info("Tool contains a command%s." % interpreter_info)

1 comment on commit 4f61025

@erasche

This comment has been minimized.

Copy link
Member

erasche commented on 4f61025 Apr 15, 2015

Oh, excellent, thank you!

Please sign in to comment.