From d2903f2ba76ff3461ea8c087f462840e9518ef17 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Sat, 27 Nov 2021 14:58:19 +0100 Subject: [PATCH] check tool_id only if present --- lib/galaxy/tool_util/linters/general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/linters/general.py b/lib/galaxy/tool_util/linters/general.py index 2911f2baed2..62184ee2a79 100644 --- a/lib/galaxy/tool_util/linters/general.py +++ b/lib/galaxy/tool_util/linters/general.py @@ -57,8 +57,8 @@ def lint_general(tool_source, lint_ctx): lint_ctx.error(ERROR_ID_MSG, line=tool_line) else: lint_ctx.valid(VALID_ID_MSG % tool_id, line=tool_line) - if re.search(r"\s", tool_id): - lint_ctx.warn(WARN_ID_WHITESPACE_MSG % tool_id, line=tool_line) + if re.search(r"\s", tool_id): + lint_ctx.warn(WARN_ID_WHITESPACE_MSG % tool_id, line=tool_line) profile = tool_source.parse_profile() profile_valid = PROFILE_PATTERN.match(profile) is not None