Skip to content

Hint only #99

@HolQue

Description

@HolQue

When testing the ${} substitution, it is still possible to get results like:

variant_numberVAR-${dict_variants.${variant_key_str()}}_MS-${dict_milestones.milestone_key_str(2)}_param

(instead of VAR-VARIANT-1_MS-MILESTONE-2_param)

I wonder why there are still pairs of '${' and '}' inside.

For me it looks like that the "substitution finished" criteria is not proper. Because at end of all substitutions I do not expect any '${' any more in the result. Or I expect a syntax error. Or a "missing parameter" error.

Maybe something like a "final validation" check can be added, an internal check to verify the integrity of the result: In case of any '${' can be found, this is an indicator for a failed substitution.

And in case of the expression is a name of a parameter or the name of a dictionary key, at least a "naming convention" check should inform about an invalid name (because I would assume, that characters like '$' and '{' and '}' are not allowed inside names).

Both checks together would make sure that the JsonPreprocessor does not return values like above.

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions