Browse files

Update linting for parameters that define arguments and not names.

With test case.

Closes #245.
  • Loading branch information...
jmchilton committed Jul 2, 2015
1 parent 7835fad commit aad1eedd9115541dc7c1b8489cac9873da19f6d5
Showing with 32 additions and 2 deletions.
  1. +2 −2 planemo_ext/galaxy/tools/linters/
  2. +30 −0 tests/data/tools/ok_param_argument.xml
@@ -10,15 +10,15 @@ def lint_inputs(tool_xml, lint_ctx):
if "type" not in param_attrib:
lint_ctx.error("Found param input with no type specified.")
has_errors = True
if "name" not in param_attrib:
if "name" not in param_attrib and "argument" not in param_attrib:
lint_ctx.error("Found param input with no name specified.")
has_errors = True

if has_errors:

param_type = param_attrib["type"]
param_name = param_attrib["name"]
param_name = param_attrib.get("name", param_attrib.get("argument"))
if param_type == "data":
if "format" not in param_attrib:
lint_ctx.warn("Param input [%s] with no format specified - 'data' format will be assumed.", param_name)
@@ -0,0 +1,30 @@
<tool id="copy" name="Copy Dataset" version="1.0">
<description>copies a dataset</description>
cp $input $output
<param name="input1" type="data" format="txt" label="Concatenate Dataset"/>
<param argument="-r" type="data" format="txt" label="Recursive?"/>
<data name="output" format="txt"/>
<test expect_failure="true" expect_exit_code="1">
<param name="input1" value="1.bed"/>
<has_line line="Indexed 0 sequences" />
<has_line line="Identifier 'gi|16127999|ref|NP_414546.1|' not found in sequence file" />
Some Awesome Help!
<citation type="doi">10.1101/014043</citation>

0 comments on commit aad1eed

Please sign in to comment.