[Bro-Dev] Coding style enforcement

Matthias Vallentin vallentin at icir.org
Fri Mar 11 14:58:45 PST 2016

While porting Broker to the latest CAF version, I am realizing that the
current pre C++11 coding style is not very conducive. Since the
introduction of lambdas, and in particular with CAF's asynchronous and
template-heavy programming model, the Whitesmiths style isn't very

Once can consider Broker a separate project, and perhaps a style change
wouldn't be as complicated as in the main Bro code, I still wanted to
check in with you whether anyone would object to changing the style. In
particular, I'm planning to use CAF's coding style [1], which provides a
unified style for meta programming as well as "regular" programming.

There exists also a clang-format style file for this [2], which makes it
really easy to enforce this style globally. Unfortunately, clang-format
currently doesn't support the Whitesmiths style, so using this tool for
Bro is not (yet) an option. (There exists an unmerged patch that needs
some cleanup [3], if anyone wants to go for it.)

On a related note: I'd also like to see stricter git commit message
guidelines, at least putting strict rules on the first line [4]. Would
you be in favor of such rules on commit messages? 


[1] https://github.com/actor-framework/actor-framework/blob/master/CONTRIBUTING.md
[2] https://github.com/actor-framework/actor-framework/blob/master/.clang-format
[3] http://reviews.llvm.org/D6833
[4] https://github.com/agis-/git-style-guide#messages

More information about the bro-dev mailing list