Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » C/C++ code formatting from command line
C/C++ code formatting from command line [message #627155] Wed, 22 September 2010 21:19 Go to next message
Mark F is currently offline Mark FFriend
Messages: 1
Registered: September 2010
Junior Member
Is it possible to invoke C/C++ Formatter from the command line?

This page details how to invoke the Java code formatter but I can find no information on how to do the same for C/C++ code.

Re: C/C++ code formatting from command line [message #641194 is a reply to message #627155] Wed, 24 November 2010 14:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: russlewi.cisco.com

On Wed, 22 Sep 2010 17:19:14 -0400, <mark.frost@gmail.com> wrote:

> Is it possible to invoke C/C++ Formatter from the command line?
>
> http://blogs.operationaldynamics.com/andrew/software/java-gn ome/eclipse-code-format-from-command-line.html
> details how to invoke the Java code formatter but I can find no
> information on how to do the same for C/C++ code.
>
>

I'm looking to do the exact same thing. We're importing a bunch of legacy
code, and the formatting is a disaster. Ident and astyle would let us do
it with a script, but we like the ease and flexibility of CDT's code style
tool for tweaking whitespace and other preferences.

Thanks,
-Russell
Re: C/C++ code formatting from command line [message #1093726 is a reply to message #627155] Sat, 24 August 2013 15:04 Go to previous message
Alexey Skvortsov is currently offline Alexey SkvortsovFriend
Messages: 1
Registered: August 2013
Junior Member
You can try this: github.com/x8o1Y/EclipseCCodeFormatter

This command-line utility is designed to format the C/C++ source code using the formatting tool built into the Eclipse CDT (CCodeFormatter).
Previous Topic:Show reference work @ declation site, but not definition
Next Topic:C++ 11 Symbol could not be resolved (containers)
Goto Forum:
  


Current Time: Sat Apr 20 00:42:24 GMT 2024

Powered by FUDForum. Page generated in 0.04162 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top