Skip to content

Fix validate command: output format, passthrough args, help text #92

Closed

Description

@neuromechanist

Problem

Three issues with nemar dataset validate:

1. Default output is too verbose (17K lines vs 356 lines)

Our output lists every single validation issue individually (7,793 issues = 17,460 lines for the HBN test dataset). The native deno run jsr:@bids/validator groups issues by code/subCode, shows 2 example files per group, then "N more files with the same issue", plus NeuroStars links and a summary table (356 lines).

2. No passthrough args

The bids-validator supports many options we don't expose (--ignoreNiftiHeaders, --max-rows, --schema, --debug, --outfile, etc.). Users can't pass these through.

3. Help text is cluttered

The addHelpText("after", ...) block adds a wall of text (Description, Requirements, Exit Codes, Examples) after the options list, making help hard to scan.

Strategy

Output format (main fix)

Instead of always running deno with --json and reformatting (which loses the native grouping), run deno in text mode by default and pass its stdout/stderr through directly. This matches the native bids-validator output automatically.

  • Default: run deno in text mode, pipe output through
  • --json: run deno with --json, pass raw JSON through
  • --verbose: pass --verbose to deno (its native verbose mode)
  • Keep validateBidsDataset() (JSON mode) for programmatic use by the upload command

Passthrough args

Support -- separator to pass extra args to the underlying bids-validator:

nemar dataset validate ./ds -- --ignoreNiftiHeaders --max-rows 500

Help text

  • Remove the addHelpText block
  • Add a note about -- passthrough in the description
  • Keep it concise

Activity

  1. added
    enhancement
    on Feb 2, 2026
  2. neuromechanist commented on Feb 24, 2026

    @neuromechanist
    ContributorAuthor

    Fixed by PR #93 (merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions