Re: a simple formatter

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Thu, 07 Feb 2008 19:09:01 -0700

On Fri, 2008-02-08 at 14:31 +1300, Amos Jeffries wrote:
> > On Wed, 2008-02-06 at 21:26 +0200, Tsantilas Christos wrote:
> >> Do we need something like that? Any comments/suggestions? Any testers?
> >
> > I believe we do and I appreciate you working on it! Please try to fix
> > the remaining problems Amos pointed out.
> >
> > Also, can you apply it to the entire Squid tree, remove all whitespace,
> > and calculate md5, comparing that with the virgin whitespace-less tree?
> > The MD5s should be the same, right?
>
> Oooh. Nice test.
>
> >
> > This is not a perfect check because spaces within strings/etc are
> > stripped and not checked, but it is a pretty good one.
>
> It will also miss the "#if 0 {" block problem.

Are there free C++ source code obfuscation programs? If they are
guaranteed to generate the same source code regardless of formatting,
then applying them would catch even more bugs.

Too bad compilers produce different output for each execution due to
timestamps and such. Perhaps there is a way to avoid that and compare
md5s of squid executables?

Cheers,

Alex.
P.S. A basic test file would be good to have anyway, so thank you for
bootstrapping that.
Received on Thu Feb 07 2008 - 19:09:08 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST