Is it possible to stop editor from inserting blank lines between statements in script mode

When I go from script mode to manual mode and back, the editor and blank lines in between every statement. This makes the code hard to read. There are some lines of code that I want grouped together with no blank lines in between.

I have not found a setting that stops the tool from doing this. The code runs without the blank lines so why are they inserted.

I also found that it decides to randomly delete commented out code and delete classes that I created to perform functions like lazy loading pages.

It is similar to the “How to disable editor script from auto formatting”

This is annoying.


1 Like

I recall in my early days I used to see this a lot. During that time (a very short period of time, I have to say), I was using both Manual view and Script view.

What did I change? No idea, but I did stop using Manual view and told Katalon to default to Script view. Maybe this does the trick?

1 Like

And just in case, my Editors settings…

1 Like

And if someone could explain how to copy all these settings between upgrades I’d appreciate it.

Thanks … I have the same editor settings … Multiple people touch the script and they all use manual since they aren’t programmers … switching to manual and to script causes auto formatting :frowning:

They need to add an option to disable auto formatting

1 Like

There might be one, somewhere. But wading through that stuff is coma-inducing.

@devalex88 any ideas to prevent auto-formatting?

What about this (note: unchecked)

That option is only available for Java not Groovy :frowning:

That is exactly what I am looking for … It is disabled already in Java and not available for Groovy

Agreed. But some of the settings are inherited.

Just wondering… turn it on. Close Katalon.

Turn it off. Close Katalon

Try again.

Perhaps the default is in place and a toggle might give it a kick where the sun don’t shine.

Unbelievable, but this problem still persist and it extremely annoying. Thank you for ignoring this @Katalon_team

Thanks @Russ_Thomas for your try.

2 Likes Did you find any solution for this??? It messing my assert statement by removing parenthesis!

Original assert:

assert (Nr_Of_IOW_Variables == null ? “” : Nr_Of_IOW_Variables.toString()) == nrOfIOWVariables : 'Exported file mismatch!

Katalon’s formatting:

assert Nr_Of_IOW_Variables == null ? “” : Nr_Of_IOW_Variables.toString() == nrOfIOWVariables : ‘Exported file mismatch!’

Argh!! @Katalon_team!!! I just lost half of day on this!

I never found a solution and stopped trying to use this tool. I moved to Robot Framework and have been much happier and productive.

Thank you I’m stuck with Katalon on this project. Thanks for the hint, I will try Robot framework.

Try changing the formatter to Java Convention. Test your formatting now.

If above alone doesn’t work - then check the item "Format source code from Save action settings.

Hi everyone. I’m coming across this too and I think it would be great for us to have an option to stop Katalon from automatically formatting the script version of the test case when making a change in manual.
Thanks for everyone’s input so far but none of it has worked for me unfortunately.

1 Like

Sorry, but that’s not true.

If you go into Manual view, you are say “please give me the formatting defaults and arrange my code for me.” It’s pointless to then complain about it - you know what it’s going to do.

I’m closing this thread before it meanders too far off into the weeds.