chimpler / pyhocon

HOCON parser for Python
Apache License 2.0
502 stars 118 forks source link

Broken parsing validation on double commas within arrays #317

Open steffanmusokedd opened 11 months ago

steffanmusokedd commented 11 months ago

What:

When parsing an array with two consecutive commas, no parsing error is thrown. In this case we should expect a syntax error.

ex.

array = [1, 2, , 3, 4]

Potential issue:

Looks like there was a workaround for trailing commas that likely is root cause. https://github.com/chimpler/pyhocon/blob/master/pyhocon/config_parser.py#L754-L764