Skip to content

Commit

Permalink
implement check if skipped linters are available
Browse files Browse the repository at this point in the history
will only work with 24.0
  • Loading branch information
bernt-matthias committed Jan 16, 2024
1 parent 2ea43a4 commit 4b2794c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion planemo/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 4b2794c

Please sign in to comment.