Refactor parseCommandLine into 2 functions
in my library, kaitaiStructCompile.py in the config schema there is a field for passing additional com[iler flags which are not in the schema. This is a fallback solution allowing passing flags without changing the code of kaitaiStructCompile.

When using java interface I need to parse these flags into CLIConfig and RuntimeConfig. This should be done by KSC, not my library. But now the parsing function is not suitable for this use case.

1 it checks that the required arguments are present, but in my field they are not. I have to workaround this by adding them.
2 the errors are printed into stdout instead of being available as result.

So I guess it may have sense to abstract it out a bit more:
1 make checks of presence required arguments disableable via a func parameter
2 return errors in

And wrap this function into the one interacting with CLI.

This way I would be able to use it to parse flags without ugly workarounds and will be able to abort on error in flags.