bids-validator
bids-validator copied to clipboard
deno: lost --config option?
Trying to run bids-examples tests but they use https://github.com/bids-standard/bids-examples/blob/master/bidsconfig.json file via -c option to ignore 99 error.
Is -c coming to deno version of validator?
It's not implemented but partly because the format here is different (issues no longer have a number assigned) and partly because it can be done by passing in alternative schemas. Maybe we should allow a way to exclude a path in the schema as a simpler way to disable a check?
Maybe we should allow a way to exclude a path in the schema as a simpler way to disable a check?
- is such a path reported in the validator output and "specific-enough" to identify the issue to skip (or to change level e.g. from WARNING to ERROR etc)
- I do not think all errors would have path in the schema since some checks might still be "code driven" right?
Every issue should have a code, such as REQUIRED_FIELD_MISSING (I don't think that's real). There's a many-to-one mapping from schema rules (e.g., rules.files.raw.func.BOLD) to issue codes. So it seems like a reasonable config would be something like:
ignore:
- CODE1 # Any rule that triggers this issue
- CODE2
- CODE3: # Just some rules
- rule1
- rule2
warn:
- CODE4
error:
- CODE5:
- rule3
- rule4
I would also be inclined to command-line arguments:
--ignore CODE1 CODE2 CODE3:rule1 CODE3:rule2 \
--warn CODE4 \
--error CODE5:rule3 CODE5:rule4