Skip to content

Commit

Permalink
Include regex when linting validators
Browse files Browse the repository at this point in the history
This will catch invalid regex expression too.
  • Loading branch information
davelopez committed Sep 13, 2023
1 parent af8edd2 commit c9657e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/tool_util/linters/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c9657e2

Please sign in to comment.