Using the command line#
The BIDS Validator may be run with the Deno runtime. For detailed installation instructions, see Deno - Installation. Deno is also available as a conda-forge package.
Installation#
In general, there is no need to install Deno applications.
deno run
allows running from the Javascript Repository:
deno run -ERWN jsr:@bids/validator <dataset>
However, you can also install a lightweight script (into $HOME/.deno/bin
):
deno install -ERWN -g -n bids-validator jsr:@bids/validator
Or compile a bundled binary:
deno compile -ERWN -o bids-validator jsr:@bids/validator
Usage#
The BIDS Validator takes a single dataset as input:
deno run -ERWN jsr:@bids/validator <dataset>
bids-validator <dataset>
Options#
Option |
Description |
---|---|
|
Log more extensive information about issues |
|
Specify an alternative BIDS Schema for validation |
|
Provide a configuration file |
|
Validate datasets found in |
|
Write validation results to file. |
|
Output results in machine-readable JSON |
|
Do not report warnings |
|
Do not open NIfTI files, skipping any checks that rely on NIfTI header data |
|
Perform filename checks only on newline-separated filenames read from stdin |
|
Raise error if passed modalities are detected in the dataset. Modalities may be any of |
|
Enable logging at the specified level. Default level is |
|
Enable/disable color. The validator also respects the NO_COLOR and FORCE_COLOR environment variables. |
Configuration file#
The schema validator accepts a JSON configuration file that reclassifies issues as warnings, errors or ignored.
{
"ignore": [
{ "code": "JSON_KEY_RECOMMENDED", "location": "/T1w.json" }
],
"warning": [],
"error": [
{ "code": "NO_AUTHORS" }
]
}
When a configuration specifies location
without leading /
it is interpreted
as a glob pattern following gitignore syntax.
The issues are partial matches of the Issues that the validator accumulates.
Pass the --json
flag to see the issues in detail.