This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hello,
How can I stop the formatter from moving the semicolon to the next line, as shown below.
Thanks,
Stephen
//Before formatting int x,y; #define abc x = 2; y = 2 int main() { abc; } //After formatting int x,y; #define abc x = 2; y = 2 int main() { abc ; }
I found an open bug against Eclipse for this issue here. I tried to find other workarounds (such as editing CDT formatter settings) but have been unsuccessful so far.
stevenh said:According to bugs.eclipse.org/.../show_bug.cgi <setting id="org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line" value="false"/> should fix the issue.
That workaround seems to work for a slightly different construct (empty statement) but not for macros. Unfortunately I was not able to find a workaround for macros.