Skip to content

Commit

Permalink
also warn in case of a filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed May 9, 2023
1 parent f2adc4c commit 111ba2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/linters/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def lint_output(tool_xml, lint_ctx):
if label in labels:
filter_node = output.find(".//filter")
if filter_node is not None:
lint_ctx.info(
lint_ctx.warn(
f"Tool output [{name}] uses duplicated label '{label}', double check if filters imply disjoint cases",
node=output
)
Expand Down
10 changes: 5 additions & 5 deletions test/unit/tool_util/test_tool_linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,14 +1417,14 @@ def test_outputs_duplicated_name_label(lint_ctx):
tool_source = get_xml_tool_source(OUTPUTS_DUPLICATED_NAME_LABEL)
run_lint(lint_ctx, outputs.lint_output, tool_source)
assert "4 outputs found." in lint_ctx.info_messages
assert len(lint_ctx.info_messages) == 1
assert not lint_ctx.valid_messages
assert len(lint_ctx.warn_messages) == 2
assert "Tool output [valid_name] uses duplicated label '${tool.name} on ${on_string}'" in lint_ctx.warn_messages
assert (
"Tool output [yet_another_valid_name] uses duplicated label 'same label may be OK if there is a filter', double check if filters imply disjoint cases"
in lint_ctx.info_messages
in lint_ctx.warn_messages
)
assert len(lint_ctx.info_messages) == 2
assert not lint_ctx.valid_messages
assert len(lint_ctx.warn_messages) == 1
assert "Tool output [valid_name] uses duplicated label '${tool.name} on ${on_string}'" in lint_ctx.warn_messages
assert "Tool output [valid_name] has duplicated name" in lint_ctx.error_messages
assert len(lint_ctx.error_messages) == 1

Expand Down

0 comments on commit 111ba2e

Please sign in to comment.