From a99cdc443750e6bbb045ac3cfe236a3aee35e1b9 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Fri, 25 Oct 2024 13:45:20 -0400 Subject: [PATCH] fix(cli): Allow blacklisting any modality from schema.rules.modalities --- bids-validator/src/setup/options.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bids-validator/src/setup/options.ts b/bids-validator/src/setup/options.ts index 34fb03944..76aa10f1d 100644 --- a/bids-validator/src/setup/options.ts +++ b/bids-validator/src/setup/options.ts @@ -3,6 +3,7 @@ import type { LevelName } from '@std/log' import { Command, EnumType } from '@cliffy/command' import { getVersion } from '../version.ts' import type { Issue, Severity } from '../types/issues.ts' +import { schema } from '@bids/schema' /** * BIDS Validator config file object definition @@ -31,7 +32,7 @@ export type ValidatorOptions = { } const modalityType = new EnumType( - ['MRI', 'PET', 'MEG', 'EEG', 'iEEG', 'Microscopy', 'NIRS', 'MRS'], + Object.keys(schema.rules.modalities) ) /** Extendable Cliffy Command with built in BIDS validator options */