Author Topic: C/C++ beautifier  (Read 3493 times)


  • Senior Community Member
  • Posts: 200
  • Hero Points: 13
C/C++ beautifier
« on: June 04, 2009, 04:11:41 pm »
I work with an old school dev that doesn't follow our formatting rules (this is ok for now, since we're a startup trying to get stuff done as quickly as possible, we'll worry about standards later..), but his code is extremely difficult to read.. He seems to code like disk space is a massive cost, and wants to preserve those bytes on disk..

I attempt to run it through the beautifer, and it works for the most part, except for 2 things:

1. Spaces around operators: What I see:

Code: [Select]

what I want to see:

Code: [Select]
x = (x % grid) - (offset * offset_grid);

2. Spaces after ,'s in func/method calls. What I see:

Code: [Select]

what I want to see:

Code: [Select]
myFunc(x, y, z);

Is there anyway we can get the beautifier to handle this? I haven't been able to find the trick if there is one.



  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: C/C++ beautifier
« Reply #1 on: June 04, 2009, 08:56:49 pm »
use Uncrustify.