nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.76k stars 630 forks source link

Trim whitespace in `container` #4347

Open ewels opened 1 year ago

ewels commented 1 year ago

Nextflow should automatically trim any trailing whitespace from a parsed container directive before attempting to pull it.

For example: https://github.com/nf-core/modules/blob/f9c512bea532dbe9c043c2925cc50b9f27f28e37/modules/nf-core/controlfreec/freec/main.nf#L7C1-L7C88

pditommaso commented 1 year ago

Lazy pipeline developers! 😆

pditommaso commented 1 year ago

Now seriously speaking not sure we should do this. Therefore dozens of directives in nextflow for none of them we are stripping blanks. Why it should be done only for container ?

ewels commented 1 year ago

Maybe we should be stripping them in all directives? Good point! 😉

I think in cases where we know that whitespace doesn't make sense (container - gives invalid URIs, cpus - should be numeric and so on), there's no reason not to do it?

I think task.ext stuff is the one that springs to mind for me where someone might genuinely want to submit a string with trailing whitespace.

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.