Skip to content

Nextflow strict syntax for non-nf-core-modules/workflows#942

Merged
d4straub merged 6 commits intonf-core:devfrom
d4straub:strict-syntax-nf25.10.2
Jan 22, 2026
Merged

Nextflow strict syntax for non-nf-core-modules/workflows#942
d4straub merged 6 commits intonf-core:devfrom
d4straub:strict-syntax-nf25.10.2

Conversation

@d4straub
Copy link
Collaborator

@d4straub d4straub commented Jan 21, 2026

All warnings and errors with

NXF_VER=25.10.2 nextflow lint ampliseq -exclude ".git,.nf-test,nf-test.config"
NXF_VER=25.12.0-edge nextflow lint ampliseq -exclude ".git,.nf-test,nf-test.config"

were fixed in non nf-core modules and subworkflows. Some modules and the nf-core subworkflow fasta_newick_epang_gappa are still having warnings.

NXF_VER=25.12.0-edge NXF_SYNTAX_PARSER=v2 nextflow run ampliseq --help
was fixed via an update of the subworkflow utils_nfschema_plugin, but it still warns about:

WARN: Unrecognized config option 'validation.defaultIgnoreParams'
WARN: Unrecognized config option 'validation.monochromeLogs'

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/ampliseq branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@d4straub
Copy link
Collaborator Author

d4straub commented Jan 21, 2026

Linting issues are:

╭─ [✗] 3 Pipeline Tests Failed ────────────────────────────────────────────────╮
│                                                                              │
│ nf_test_content: 'nf-test.config' does not set a testsDir, it should contain │
│ testsDir "."                                                                 │
│ nf_test_content: 'nf-test.config' does not set a workDir, it should contain  │
│ workDir System.getenv("NFT_WORKDIR") ?: ".nf-test"                           │
│ nf_test_content: 'nf-test.config' does not set a configFile, it should       │
│ contain configFile "tests/nextflow.config"                                   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

╭─ [✗] 1 Subworkflow Test Failed ──────────────────────────────────────────────╮
│                                 ╷                     ╷                      │
│ Subworkflow name                │ File path           │ Test message         │
│╶────────────────────────────────┼─────────────────────┼─────────────────────╴│
│ utils_nfschema_plugin           │ subworkflows/nf-co… │ check_local_copy:    │
│                                 │                     │ Local copy of        │
│                                 │                     │ subworkflow does not │
│                                 │                     │ match remote         │
│                                 ╵                     ╵                      │
╰──────────────────────────────────────────────────────────────────────────────╯

so either I satisfy linting with nextflow or linting wit nf-core...

Edit:

  • 'nf-test.config' should not be changed -> reverted previous edit
  • nf-core subworkflows update utils_nfschema_plugin fixes the utils_nfschema_plugin error

@d4straub d4straub marked this pull request as ready for review January 22, 2026 10:02
Copy link
Member

@erikrikarddaniel erikrikarddaniel left a comment

Choose a reason for hiding this comment

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

I don't understand the leading underscores in variable names, but otherwise this looks fine.

//Get folder information
ch_reads
.flatMap { meta, reads -> [ meta.run ] }
.flatMap { meta, _reads -> [ meta.run ] }
Copy link
Member

Choose a reason for hiding this comment

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

Why did you add an underscore to reads here but not to meta, but you did add to meta elsewhere? (Not to mention why add leading underscores at all, but that's some new guideline I suppose.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Whenever a variable is not used, i.e. here "reads" is dropped, nextflow lint gives a warning. This warning can be avoided by prepending an underscore. So its driven by the nextflow linting, as in the opening post. However, it seems to me to have also practical value by visualizing what information is dropped/not used (trivial here in that example, but can be more informative e.g. in subworkflow input).

Copy link
Member

Choose a reason for hiding this comment

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

I see, that makes sense.

@d4straub
Copy link
Collaborator Author

Thanks!

@d4straub d4straub merged commit 980fd94 into nf-core:dev Jan 22, 2026
35 checks passed
@d4straub d4straub deleted the strict-syntax-nf25.10.2 branch January 22, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments