validate icon indicating copy to clipboard operation
validate copied to clipboard

var_group: integration with metadata

Open flownt opened this issue 10 months ago • 0 comments

Currently var_group has the effect of renaming the rule by appending an index (.1, .2, etc.) to the name to indicate which variable was used, whereas other metadata (e.g. Description, Label) is unaffected.

I would like a glue-like syntax to also apply the var_group-expansion to the metadata of a rule and have these expansions available for further processing.

rules:
   - expr: "G:= var_group (a, b, c) "
   - expr: "G<0"
     name: "negative.{G}"
     label: "{G} should be negative"
     description: "The variable {G} is a debt and therefore always negative."
     meta: 
         severity:
             "error"

Ideally this would net me a validate::validator with 3 rules, corresponding to a, b and c.

flownt avatar Feb 25 '25 14:02 flownt