Fix strict syntax in utils_* subworkflows#12329
Conversation
|
|
||
| emit: | ||
| valid_config = valid_config | ||
| valid_config |
There was a problem hiding this comment.
I thought we needed this for strict syntax a3fb735
There was a problem hiding this comment.
I can't find the documentation for this, but nextflow lint shows a warning if a workflow has a single output and it is named. I have sent the warning message on Slack. I agree with Maxime that this rule should not be there, but that's the way Ben designed it.
There was a problem hiding this comment.
but in the current way i get the following with nextflow 26.04.4:
Warn subworkflows/nf-core/utils_nfcore_pipeline/main.nf:16:5: Variable was declared but not used
│ 16 | valid_config = checkConfigProvided()
╰ | ^^^^^^^^^^^^
Warn subworkflows/nf-core/utils_nfcore_pipeline/main.nf:20:5: Emit name should be omitted when there is only one emit
│ 20 | valid_config
╰ | ^^^^^^^^^^^^
that's why I had the previous version
There was a problem hiding this comment.
I must have tested with a wrong version, with 26.04.4 it indeed returns these warnings. According to the docs the version without the extra name is correct. I am puzzled as to how I should write the emit section to avoid complaints from the language server.
Removed names of single outputs in utils_* subworkflows to comply with Nextflow strict syntax. Edited metas to match. This should remove strict syntax warnings in pipelines.
PR checklist
nf-core subworkflows test <SUBWORKFLOW> --profile dockernf-core subworkflows test <SUBWORKFLOW> --profile singularitynf-core subworkflows test <SUBWORKFLOW> --profile conda