[postgis-devel] Astyle Bot

Nicklas Avén nicklas.aven at jordogskog.no
Fri May 13 23:52:49 PDT 2011


----- Original message -----
> I'm not sure if this is the 4th or 5th time this has come up...

I must have missed 2 or 3 of them.

> This causes future commits to potentially fail, and there is NO WAY to 
> update your client because it thinks that everything is happily the same 
> updated version as is in the repo.

Ok I see th problem.

> We could do an automatic process to go in after an update and checkout 
> any changed files, restyle them, and commit them, but then our SVN 
> history is full of "restyle" commits. This causes confusion when looking 
> for "who/what broke the build?" and generally just seems messy to me... 
> comparably messy to just having an irregularly styled codebase.

i am not sure I agree here. according to our style guidelines:
we are supposed to do the style-committ separerately anyway.
But I agree that it would be messy to do it after each commit.

Maybe a middleway would be to run it once a week automatically with a fixed easy to see message. i don't think that commit will mess up the timeline too much and the code will not be too messed up in one week if we try to keep the style manually.


> What we could do is put a pre-commit hook in SVN that runs astyle and 
> looks for changes - if there are any, then the commit is rejected, and 
> you have to run astyle yourself before committing. However, due to the 
> apparent lack of compatibility between versions of astyle, this doesn't 
> seem to work either. Perhaps we could include a version of astyle or a 
> similar script inside postgis? Similar to including autoconf-generated 
> tools. Then we can ensure that the same formatting is being run on both 
> the SVN server and all clients. I don't know whether this is possible 
> with astyle or if there is another tool that could do it?
> Not to start a holy war but I don't really have a problem with 
> formatting in general. Compared to Mapserver, the PostGIS code looks 
> great! But then, more developers == more differences. So anyways I'm 
> pretty indifferent about the "solution" to this "problem".
> Chris
> On 13/05/2011 1:22 PM, Paragon Corporation wrote:
> > +1
> > 
> > Strk and Nicklas,
> > But I thought we had this discussion and putting in an SVN hook or a
> > smart Astyle bot was only in our dreams?   Is it possible?
> > 
> > Thanks
> > Regina
> > 
> > On Fri, May 13, 2011 at 12:30:06PM +0200, Nicklas Avén wrote:
> > 
> > > We run a lot of different jobs building documentation, building
> > > postgis for regresstest and so on.
> > > 
> > > Why is it a problem to run astyle somewhere in the chain too?
> > +1 on this, let's have bots cleanup the code for us.
> > 
> > --strk;
> > 
> > 
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110514/6a188d17/attachment.html>

More information about the postgis-devel mailing list