From 4b2794c87cce9a6adea55549e89bc712b593adad Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 16 Jan 2024 11:56:54 +0100 Subject: [PATCH] implement check if skipped linters are available will only work with 24.0 --- planemo/lint.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/planemo/lint.py b/planemo/lint.py index a8df3504a..9d21317d8 100644 --- a/planemo/lint.py +++ b/planemo/lint.py @@ -4,7 +4,10 @@ from urllib.request import urlopen import requests -from galaxy.tool_util.lint import LintContext +from galaxy.tool_util.lint import ( + LintContext, + list_linters, +) from planemo.io import error from planemo.shed import find_urls_for_xml @@ -30,6 +33,18 @@ def build_lint_args(ctx, **kwds): continue skip_types.append(line) + from planemo.linters import ( + biocontainer_registered, + conda_requirements, + doi, + urls, + xsd, + ) + linters = list_linters([biocontainer_registered, conda_requirements, doi, urls, xsd]) + for skip_type in skip_types: + if skip_type not in linters: + error(f"Unknown linter type {skip_type} in list of linters to be skipped. Known linters {linters}") + lint_args = dict( level=report_level, fail_level=fail_level,