nf-core / nf-core/tools

Schema validation error when type: integer param has empty string as default

Open
#3,794 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

When a parameter in nextflow_schema.json is declared with type: integer but the default value is set as an empty string (""), pipeline tests fail with a confusing error message.

Expected behavior:

  • Either nf-core/tools should catch this situation and produce a clear, user-friendly error message (e.g., "Parameter X has type integer but default is an empty string")

  • Or the schema validator should allow omission of the default entirely when none is intended.

Command used and terminal output
nf-core pipelines lint --all
System information
Image

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with nf-core pipelines lint --all using a nextflow_schema.json parameter declared as an integer with an empty-string default. Trace the schema-validation error and determine whether the validator should report this mismatch clearly or accept an omitted default. Done means the command produces an actionable error or handles the absent default without the confusing failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.