Community
Participate
Working Groups
Before the codes as follows: ... //--------------------------------------------------- // Method Name: collectOptData // Description: triggers collection of Optical PM data //--------------------------------------------------- void Ot11dpe12ePmDataCollector::collectOptData() { ... } //--------------------------------------------------- // Method Name: getOptData // Description: gets Optical PM data //--------------------------------------------------- int Ot11dpe12ePmDataCollector::getOpticalPwr(int direction, int &pwrval) { LTRACE(TRCENTRY | TRCLVL3, "Ot11dpe12ePmDataCollector::collectOptData\n"); float op; // Retrive Power for Line or Client Port if ((portNum >= e11DPE12E_NetworkPort1Num)) { ... } } ... When use BSD/Allman profile Code Style/formatting do format(ctrl+shift+F), the codes changed as follows: ... //--------------------------------------------------- // Method Name: collectOptData // Description: triggers collection of Optical PM data //--------------------------------------------------- void Ot11dpe12ePmDataCollector::collectOptData() { ... } //--------------------------------------------------- // Method Name: getOptData // Description: gets Optical PM data //--------------------------------------------------- int Ot11dpe12ePmDataCollector::getOpticalPwr(int direction, int &pwrval) { LTRACE(TRCENTRY | TRCLVL3, "Ot11dpe12ePmDataCollector::collectOptData\n"); float op; // Retrive Power for Line or Client Port if ((portNum >= e11DPE12E_NetworkPort1Num)) { ... } } ... The head "//" comments of method will indent 4 space, and "//"comments in method will indent 8 space, this was very strange. The GNU, K&R and Whitesmits profile was same as BSD/Allman for this case.
I cannot reproduce with the given example. I suspect some parsing error and/or exception during formatting. Please attach the error log of your workspace after an attempt to format. Also, please try to create a reproducible example. Thanks.
Created attachment 177246 [details] can not format this file This file can not format some comments use BSD/Allman profile Code Style/formatting.
Works for me. Please attach the error log file (<workspace>/.metadata/.log).
Created attachment 177416 [details] CDT log Log for format issue of CDT.
This is another instance where the formatter gets confused by some macros. It would help if you could create a minimal test case which reproduces the issue.
Closing as no complete testcase has been provided. Feel free to reopen if you provide a complete testcase.