[haiku-development] Re: [haiku-development]

Jérôme Duval wrote:
2007/10/23, Ryan Leavengood <leavengood@xxxxxxxxx>:
I REALLY think we need to provide a tool to check code against our
guidelines. I need to do some research, but I'm sure there are tools
for C++ to do this.

Some time ago, I tried http://astyle.sourceforge.net/  In the end, I
had to dive in the code of the tool to have it behave nearer our
style.


I use astyle for reformatting source files and find that it comes very close to satisfying our style guidelines if the following command is used: astyle --style=kr -T -p <file name>

I use it for reformatting the X.org source code that I use in a Haiku video driver. The only problem that I have encountered with astyle is that it does not replace embedded spaces with tabs; however, I have my own command line utility for replacing spaces with tabs.

I'm using an older version (V1.15.3) of astyle since the newest version (V1.21) will not compile under BeOS or Zeta because of the old compiler that we use.

Regards,
Gerald


Other related posts: