Arduino Reformat changes data in strings

I write a lot of code.
I am using Arduino latest version.

I use AT-T to reformat code a lot. If there is a code error (wrong syntax) then AT-T often inserts spaces into strings and rearranges code following the statement [not before the statement].
This is really annoying.
Especially strings like "/anything.json" will be reformatted as " / anything.json"

To observe this behaviour the following code...

// this shows arduino reformatting error

#include <Arduino.h>

void setup()
{
// the following code is an error
// when you press ALT-T to reformat code without fixing error, note statement actually changes
if ( mySetupData<-get_answer() == false ))
{

}

// Note string below also get changed !!!!!!!!!!!!!!!!!! [ insertion of spaces in strings ]
Serial.print("Debug output is );

// const String filename = "/wificonfig.json";
const String filename = "/wificonfig.json";

}

void loop()
{

}

arduinoformaterror.ino (564 Bytes)

For your Serial.print, fix the error and press T again.

For your if statement, that will always be a problem till you fix the code. The IDE happily assumes that it's supposed to be "smaller than minus something).

I do not really feel it as annoying; one Z and you code looks again as it was before (although the cursor (or view) jumps to the end after an undo of T))