Code formatter - too many parentheses


I like the Katalon code formatter but would like to change options for how parentheses are added but I’m not able to find it. I’ve looked in the Java format options and the Eclipse and Groovy settings but I don’t see it.

I’ve researched the forum and the general answer is to disable it or modify the settings. I would like to modify the settings so my code doesn’t look like the “after”.

Before: var = a + b + c
After format: var = ((a + b) + c)

Long string commands get even longer.
sql = (((((((((((((‘UPDATE TA_API_QUERY_GRAMMAR SET ’ + ’ LAST_RUN = ‘) + ‘’’) + lastRunDate) + ‘’’) + ‘, STATUS = ‘’) + execStatus) + ‘’’) + ‘, XML_RESPONSE_TIME = ‘’) + responseTime) + ‘’’) + ’ WHERE DATA_SCENARIO = ‘’) + rs.getString(‘DATA_SCENARIO’)) + ‘’’)

Does anyone know the exact setting the will stop the extra parentheses?

Hi @Russ_Thomas,

Is there a better forum where I might get a response to my question? I didn’t want to duplicate the topic everywhere but I would like your help on which forum I should move it to (if I can even move it).


That’s actually bug related. But to answer your question, that question would fit better under KS General Discussions (only because it’s not about testing, per se).

However, like I said, there’s a bug reported about that issue, so I’ll move this to bug reports.

The cause seems to be moving between Manual view and Script view (unless you tell me otherwise). I never ever see this issue, but I never ever use manual view, fwiw.

There might be a setting for formatting but I don’t know off the top of my head. I’ll take a look but I’m not promising anything.

Aside: KS v8.x is supposed to be using a new(er) version of eclipse. :crossed_fingers:

@ThanhTo @duyluong I know this has been reported elsewhere. Any news yet on when the reparser/refactor code will be fixed to stop this happening?


FYI - It happens in script view after pressing CTRL+SHIFT+F to format the code - without switching to/from manual view.

Wow. That’s bad.

I never tried that key combo. Not going to either. :scream:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.