chimpler / pyhocon

HOCON parser for Python
Apache License 2.0
508 stars 121 forks source link

Broken parsing validation on double commas within arrays #317

Open steffanmusokedd opened 1 year ago

steffanmusokedd commented 1 year 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