Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Built-in Code Formatter

Hi,

I have committed an initial version of a built-in C/C++ code formatter
(bug 95274).

Following predefined formatting profiles are available:
- K&R
- BSD/Allman
- GNU
- Whitesmiths
(See also http://en.wikipedia.org/wiki/Indent_style)

The output of the built-in formatter depends on the quality of the AST
that can be obtained from the source code. Although, some heuristic is
used to handle syntax errors and other parsing problems, the result may
be other than expected. It may also happen, that the formatter runs into
an unrecoverable problem and simply leaves the source code unmodified.

With the tracing option "org.eclipse.cdt.core/debug/formatter=true"
you can get more details in case of formatter problems.
The trace output would be esp. helpful when attached to a bug report.

Thanks,
Toni


Back to the top