whitespace and coding style, again

Dirk Hohndel dirk at hohndel.org
Wed Feb 12 22:59:13 UTC 2014

So I've been playing with this for a while and have something that is
ugly has heck but seems to work reasonably well....

I just pushed a commit that contains a clang-format style file plus a
little perl wrapper script that takes care of some mild post-processing
for things that I cannot get clang to do right (e.g., recognize
Q_FOREACH() and for_each_dive() as control structures, so opening '{' is
on the same line, after a space). I think this needs a lot more testing,
but trying it on a few files seemed promising.

It would be nice if a couple of you could test and provide feedback.

Ideally I'd run this over the source while no one has outstanding
patches and then we could use it to check to make sure new commits don't
mess things up.

It assumes that clang-format is in your patch.

When you run

    perl scripys/whitespace.pl FILENAME

you'll get a diff of what it thinks is wrong with that file. Right now
most files have quite a bit of delta as the current state of our coding
style compliance is rather weak...


More information about the subsurface mailing list