Skip to content
Su Zhang (張甦) edited this page Oct 18, 2015 · 1 revision

Style

CCSpec code loosely follow the Google C++ Style Guide. Some rules we don't enforce are specified in CPPLINT.cfg such as writing a copyright comment at the top of each file and using cross-platform integer types (int16, int32, etc.).

Naming

Naming follows the Google style except that we don't capitalize our function names. We also use the underscore naming convention for Matcher friend constructor instead of CamelCase. For example, for a ThrowException matcher, the friend constructor would be throw_exception instead of throwException.

Linter

We use cpplint and cppcheck to automatically check styles and other common mistakes. They are integrated into the Travis build process, so the Travis CI builds will not pass unless all linters pass.

Clone this wiki locally