What is best practice for case statements in OPAL?

Line breaking case statements

Always look into using if and if_null first, but once you have enough conditions you might have to use case. If you expect your condition and value predicates to be long, it is useful to break each pair into it’s own line.

Splitting each argument into it’s own line is slightly better, but for long argument lists it becomes very hard to tell what is a condition vs what is the value.

The best you can do is have a condition, value pair on each line.

Bad OPAL:

case(starts_with(_c_configMapData_path,"["), substring(_c_configMapData_path, 2, strlen(_c_configMapData_path)-4), true, string(_c_configMapData_path))

Good OPAL:

case(
  starts_with(_c_configMapData_path,"["), substring(_c_configMapData_path, 2, strlen(_c_configMapData_path)-4),
  true, string(_c_configMapData_path))