-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Description of the bug
When linting modules that use topic: versions with eval-based version collection, the linter incorrectly drops the trailing double quote from sed/awk commands when comparing to meta.yml. This means meta.yml must have a key missing the closing " to pass lint.
Example
main.nf has:
tuple val("${task.process}"), val('ribodetector'), eval('ribodetector --version | sed "s/ribodetector //"'), emit: versions_ribodetector, topic: versionsThe eval string is: ribodetector --version | sed "s/ribodetector //"
To pass lint, meta.yml must use this malformed key (missing closing "):
topics:
versions:
- - ${task.process}:
type: string
description: Name of the process
- ribodetector:
type: string
description: Name of the tool
- ribodetector --version | sed "s/ribodetector //:
type: string
description: Version of ribodetector usedIf you write the correct key WITH the closing ":
- ribodetector --version | sed "s/ribodetector //":Linter fails:
correct_meta_topics: Module meta.yml does not match main.nf. Topics should contain:
{'versions': [['${task.process}', 'ribodetector', 'ribodetector --version | sed "s/ribodetector //']]}
Note: "s/ribodetector //' - the ' is the Python string delimiter, revealing the expected content is ribodetector --version | sed "s/ribodetector // (missing trailing ").
Observed in existing modules
This pattern appears in multiple existing modules including samtools/view, fastqc, etc. - all have meta.yml with truncated eval command keys missing the trailing ".
Related
Possibly related to #3901 (--fix produces mangled output) and #3530 (incorrect parsing with special characters).
System information
- nf-core/tools: 3.5.1
- Nextflow: 24.10.0
- OS: macOS