Skip to content

Commit 4f61025

Browse files
committed
Warn on unknown command attributes (anything but interpreter).
See galaxyproject/tools-iuc@d999f74.
1 parent 48ff49e commit 4f61025

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

planemo_ext/galaxy/tools/linters/command.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,15 @@ def lint_command(tool_xml, lint_ctx):
1515
if "TODO" in command:
1616
lint_ctx.warn("Command template contains TODO text.")
1717

18-
lint_ctx.info("Tool contains a command.")
18+
command_attrib = command.attrib
19+
interpreter_type = None
20+
for key, value in command_attrib.items():
21+
if key == "interpreter":
22+
interpreter_type = value
23+
else:
24+
lint_ctx.warn("Unknown attribute [%s] encountered on command tag." % key)
25+
26+
interpreter_info = ""
27+
if interpreter_type:
28+
interpreter_info = " with interpreter of type [%s]" % interpreter_type
29+
lint_ctx.info("Tool contains a command%s." % interpreter_info)

0 commit comments

Comments
 (0)