Hi all,

I learned about the clang formatting tool today:

    http://clang.llvm.org/docs/ClangFormat.html


I'm thinking we should run all our source through this just before the last 3.3.x release. We would of course have to create a config file suitable for our formatting standards. Once done, we could have Jenkins/CI run this on all commits, and show diffs where new code is not following the standards (or even more draconian, enforce it).

There are also some nice vim and emacs bindings to use this, e.g.

    (load "<path-to-clang>/tools/clang-format/clang-format.el")
    (global-set-key [C-M-tab] 'clang-format-region)


For our current standards, see

    https://cwiki.apache.org/confluence/display/TS/Coding+Style


Thoughts?

-- leif

Reply via email to