test-fullautomation / python-jsonpreprocessor

A preprocessor for json files
Apache License 2.0
3 stars 2 forks source link

Naming convention violation (1) #353

Open HolQue opened 1 week ago

HolQue commented 1 week ago

The naming convention tells: Key names have to start with a letter, digit or underscore.

Therefore this name is invalid:

"$A" : 1

Result:

'Invalid key name: "$A". Key names have to start with a letter, digit or underscore.'

But this is accepted:

"$A:" : 1

Result:

DotDict({'$A:': 1})

Why does the colon at the end of the key name makes a difference here?

In both cases the name starts with a character that is not a letter, not a digit and not an underscore. Therefore both names are invalid.

HolQue commented 1 week ago

Because the name is accepted, I try to use this name:

"$A:" : 1,
"p01" : ${$A:}

This causes an aftereffect:

Error: 'local variable 'tmpList03' referenced before assignment'!

HolQue commented 1 week ago

Also colons only are accepted as key name:

":::" : 1

But should not.