Embedded Artistry “format” Repository

We recently learned how to use clang-format and created our own formatting style. I also shared clang-format wrapper scripts that I use on my projects. I've created an Embedded Artistry format repository which contains my clang-format rules, helpful wrapper scripts, and an installation script. The format repository is meant to be included in other repositories …

A Strategy for Enforcing Formatting with Your Build Server

Now that we've learned to use clang-format and created style rules for our project, we need to make sure we're enforcing clang-format usage. In an optimal flow, we would enforce formatting before allowing changes to be checked in. A common strategy would be to enforce formatting using a git commit hook. However, I have two …

Creating and Enforcing a Code Formatting Standard with clang-format

I’ve worked on many programming teams which nominally have a “programming style guide.” This guide is often written down and placed in a place that developers rarely look. In almost every case the style guide is ignored, code reviews devolve into style arguments, and a multitude of styles develop inside of the source repository. The MongoDB …