diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dc9a755df..1d62b371aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ ### Modules +- Fix a bug in the regex extracting the version from biocontainers URLs [#1596](https://github.com/nf-core/tools/pull/1596) + ### Linting - Add isort configuration and GitHub workflow ([#1538](https://github.com/nf-core/tools/pull/1538)) diff --git a/nf_core/modules/lint/main_nf.py b/nf_core/modules/lint/main_nf.py index c3dd42584e..8d745cd186 100644 --- a/nf_core/modules/lint/main_nf.py +++ b/nf_core/modules/lint/main_nf.py @@ -242,7 +242,7 @@ def check_process_section(self, lines): if l.startswith("https://containers") or l.startswith("https://depot"): # e.g. "https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' :" -> v1.2.0_cv1 # e.g. "https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' :" -> 0.11.9--0 - singularity_tag = re.search(r"(?:/)?(?:biocontainers_)?(?::)?([A-Za-z\d\-_.]+)(?:\.img)?['\"]", l).group(1) + singularity_tag = re.search(r"(?:/)?(?:biocontainers_)?(?::)?([A-Za-z\d\-_.]+?)(?:\.img)?['\"]", l).group(1) if l.startswith("biocontainers/") or l.startswith("quay.io/"): # e.g. "quay.io/biocontainers/krona:2.7.1--pl526_5' }" -> 2.7.1--pl526_5 # e.g. "biocontainers/biocontainers:v1.2.0_cv1' }" -> v1.2.0_cv1