Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion subworkflows/nf-core/utils_nextflow_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ workflow UTILS_NEXTFLOW_PIPELINE {
}

emit:
dummy_emit = true
true
}

/*
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/nf-core/utils_nextflow_pipeline/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ input:
description: |
Check if the conda channel priority is correct.
output:
- dummy_emit:
- "true":
type: boolean
description: |
Dummy emit to make nf-core subworkflows lint happy
Comment thread
mashehu marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ nextflow_function {
name "Test Functions"
script "subworkflows/nf-core/utils_nextflow_pipeline/main.nf"
config "subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config"
tag 'subworkflows'
tag 'utils_nextflow_pipeline'
tag 'subworkflows/utils_nextflow_pipeline'

tag "subworkflows"
tag "subworkflows_nfcore"
tag "utils_nextflow_pipeline"
tag "subworkflows/utils_nextflow_pipeline"

test("Test Function getWorkflowVersion") {

Expand Down
2 changes: 1 addition & 1 deletion subworkflows/nf-core/utils_nfcore_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ workflow UTILS_NFCORE_PIPELINE {
checkProfileProvided(nextflow_cli_args)

emit:
valid_config = valid_config
valid_config

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we needed this for strict syntax a3fb735

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

}

/*
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/nf-core/utils_nfcore_pipeline/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ input:
description: |
Nextflow CLI positional arguments
output:
- success:
- valid_config:
type: boolean
description: |
Dummy output to indicate success
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/nf-core/utils_nfschema_plugin/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ workflow UTILS_NFSCHEMA_PLUGIN {
}

emit:
dummy_emit = true
true
}
2 changes: 1 addition & 1 deletion subworkflows/nf-core/utils_nfschema_plugin/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ input:
Whether to apply typecasting to the parameters given via the CLI before validation.
Set this to `null` to use the default behavior.
output:
- dummy_emit:
- "true":
type: boolean
description: Dummy emit to make nf-core subworkflows lint happy
authors:
Expand Down