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

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 24 Oct 2007 13:08:12 +0200 CEST

> 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>

It's a shame indent doesn't handle C++.
OTH XEmacs has M-x indent-region :)

>
> 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.
>

We could also check the svn hooks they wrote for ffmpeg.
It forbids committing c files with tabs (they hate them), and trailing
spaces.

François.

Other related posts: