diff --git a/rule_schema_v1.yaml b/rule_schema_v1.yaml index a660858a..66074644 100644 --- a/rule_schema_v1.yaml +++ b/rule_schema_v1.yaml @@ -659,15 +659,23 @@ $defs: title: Kind keyword type: string module: - title: Kind keyword + title: A module name type: string + modules: + title: A list of module names + type: array + items: + type: string required: - metavariable anyOf: - required: - kind - - required: - - module + - oneOf: + - required: + - module + - required: + - modules additionalProperties: false required: - semgrep-internal-metavariable-name diff --git a/rule_schema_v2.atd b/rule_schema_v2.atd index 00b1fc24..bfaa1742 100644 --- a/rule_schema_v2.atd +++ b/rule_schema_v2.atd @@ -415,6 +415,7 @@ type metavariable_cond = { ?kind: string option; (* for semgrep-internal-metavariable-name; consider renaming? for v2 *) ?module_ : string option; + ?modules: string list option; (* this covers regex:/pattern:, but also all:/any: with optional where: * CHECK: language is valid only when combined with a formula