Skip to content

Commit

Permalink
fix regex behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianegli committed May 19, 2022
1 parent 201b3e0 commit ff02cf0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ 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("(?:\/)?(?:biocontainers_)?(?::)?([A-Za-z\d\-_\.]+)(?:\.img)?['\"]", l).group(1)
singularity_tag = re.search("(?:\/)?(?: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
Expand Down

0 comments on commit ff02cf0

Please sign in to comment.