From c9657e25e1c7bd36ceeba7992d91709e291bdb53 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:17:43 +0200 Subject: [PATCH] Include `regex` when linting validators This will catch invalid regex expression too. --- lib/galaxy/tool_util/linters/inputs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/linters/inputs.py b/lib/galaxy/tool_util/linters/inputs.py index 0540856be567..284bb423a247 100644 --- a/lib/galaxy/tool_util/linters/inputs.py +++ b/lib/galaxy/tool_util/linters/inputs.py @@ -395,10 +395,10 @@ def lint_inputs(tool_source: "ToolSource", lint_ctx: "LintContext"): f"Parameter [{param_name}]: attribute '{attrib}' is incompatible with validator of type '{vtype}'", node=validator, ) - if vtype == "expression": + if vtype in ["expression", "regex"]: if validator.text is None: lint_ctx.error( - f"Parameter [{param_name}]: expression validators are expected to contain text", node=validator + f"Parameter [{param_name}]: {vtype} validators are expected to contain text", node=validator ) else: try: