Skip to content

Use CSV reader to parse list arguments to better handle more use cases

Duggan, John requested to merge 15-input-validation into main

shlex is neat, but it was not a wise choice on my part. If there is no space after a comma in a list, then it doesn't split properly, which is a pretty bad bug. Instead, it's better to parse the list items as CSV which will also handle quoted items properly (so 123, "1234, 1235", 124 is treated as a list of three items as expected).

Separately, Yingrui suggested that they also consider space separated items to be an acceptable list format. It's actually pretty easy to support if we just use this CSV parsing approach, so I've included it for now.

Closes #15 (closed)

Edited by Duggan, John

Merge request reports