Review inline code in markdown files for proper formatting and syntax highlighting. Check for missing backticks on CLI flags, filenames, and code elements. Verify that inline syntax highlighting (#!groovy) is used appropriately. Use when reviewing documentation or quiz questions.
Review inline code in markdown files for proper formatting and appropriate use of syntax highlighting.
See ../shared/repo-conventions.md for file conventions.
The following should always be wrapped in backticks:
CLI flags and options:
-resume, -profile, -params-file, --input, etc.Filenames and paths:
nextflow.config, .command.sh, work/, modules/, etc.Commands:
nextflow run, nextflow log, docker run, etc.Code elements:
params.inputoutputDirSAYHELLOcollect(), map(), view()container, publishDir, memoryUse `#!groovy code` for Groovy/Nextflow code that benefits from syntax colouring.
DO use #!groovy for:
`#!groovy ${variable}``#!groovy { meta.id }` or `#!groovy .map { it * 2 }``#!groovy channel.of(1,2,3).map { it * 2 }``#!groovy "${greeting}-output.txt"``#!groovy param: String = 'value'`DO NOT use #!groovy for:
`outputDir` not `#!groovy outputDir``container 'uri'` not `#!groovy container 'uri'``processName.out` not `#!groovy processName.out``include` not `#!groovy include`The rule: Only use #!groovy when there's meaningful syntax structure (braces, interpolation, operators) that highlighting will visually enhance. A single word or simple expression gains nothing from syntax highlighting.
Run the workflow with `nextflow run main.nf -resume`.
The `#!groovy ${greeting}` variable is interpolated into the string.
Set memory with `#!groovy process { withName: 'FOO' { memory = '4.GB' } }`.
The `container` directive specifies the Docker image.
Access outputs with `processName.out.outputName`.
<!-- Missing backticks -->
Run the workflow with nextflow run main.nf -resume.
<!-- Unnecessary #!groovy on single word -->
The `#!groovy container` directive specifies the image.
<!-- Missing #!groovy on closure -->
Transform with `.map { it.toUpperCase() }`.