nf-core / tools

Python package with helper tools for the nf-core community.
https://nf-co.re
MIT License
240 stars 188 forks source link

Add pipeline linting for configuration files such that all directives which use `params` are closures. #2508

Open mahesh-panchal opened 11 months ago

mahesh-panchal commented 11 months ago

Description of feature

From slack: It's still common that users want to supply parameters using -c. This often leads to users encountering this issue: https://github.com/nextflow-io/nextflow/issues/2662.

From the developer side, one change we can make is that all process directives which use params should be nested in a closure. E.g.

mode: of publishDir doesn't accept a closure, so should be the only case ignored.

There are some cases of using params in enabled: of publishDir (eg. rnaseq) which also doesn't evaluate closures. These should be linted to move the enabled: test into saveAs: to allow closures.

mahesh-panchal commented 11 months ago

It's seems there are some parameters used outside the process directive scope in the nextflow.config and these must be passed on the command-line or with a -params-file.