[Geany-devel] On coding style

Nick Treleaven nick.treleaven at xxxxx
Tue Sep 8 11:51:37 UTC 2009


On Tue, 8 Sep 2009 09:54:11 +1000
Lex Trotman <elextr at gmail.com> wrote:

> >> fix_alignment script & is it safe to just run this every time
> >> pre-commit?
> >
> > In the commit message IIRC I mentioned this is 'work in progress', I
> > probably need to make some changes before this is reliable for all of
> > src/ and plugins/.
> 
> 
> Sorry to jump the gun.  I think I said in a previous post I advise my
> consulting clients to specify their coding standard by nominating a
> formatter and the options to be used.  Other than picking a really
> stupid one, it doesn't matter what you actually pick so long as you
> always use it.
...
> So coding style *is* important and should be machine enforced, hence I
> think Nicks script is a great idea.

It's ready for some testing, but there's still a few things I want to
change before I run it on the codebase. No known bugs currently though.
The idea is to only reformat things that unambiguously need it, there's
no point introducing wrong formatting automatically, however small the
manual fix is.

> >> Several of the things you changed I had thought I had right, so maybe
> >> hacking.html needs to be more explicit rather than just "like the rest
> >> of the code".
> >> Then I could have saved you  some work :-)
> >
> > Well, we did tell you about a space after if and no space after an
> > opening bracket ;-)
> 
> I thought I had got most of them :-( but then I-am-not-a-mach-ine,
> oops that just slipped out, and I was passing the Turing test until
> then ;-)

Sorry, there probably were only a few left. It's more things like
operator spacing, but the script should (mostly) take care of that.

Regards,
Nick



More information about the Devel mailing list