Formatting

The key words “MUST”, “MUST NOT”, “SHOULD”, etc. are to be interpreted as described in RFC 2119.

1 Nextflow syntax formatting

To maintain code quality and prevent issues, all code MUST be free of Nextflow warnings and errors.

Utilize the following command to check your code:

NXF_SYNTAX_PARSER=v2 nextflow lint modules/nf-core/module_name
Note

The version two the of Nextflow strict syntax will be made default in Nextflow v26.04.

Common issues within nf-core components to avoid:

Old syntaxPrefered syntax
Undeclared variable my_variableSpecify def before the variable: def my_variable
input.collect{ it[1].name }Specify a variable name: input.collect{ meta, file -> file.name }
for loopUse the .each operator: .each{} operator

2 General module code formatting

All code SHOULD otherwise be aligned to follow the ‘Harshil Alignment™️’ format, if it does not violate the Nextflow strict syntax specifications.