Checking name styling
After meticulously formatting our code to ensure that spaces, asterisks, alignments, and brace positions are all in place, there remains one final frontier to unify – naming style. Ensuring consistency in naming conventions across classes, variables, functions, and other identifiers can often be a painstaking process, usually relegated to vigilant peer reviews. However, there’s an automated way to achieve this, thereby reducing manual effort and error.
Clang-Tidy comes to the rescue for this purpose. While we’ll dive deeper into the various capabilities of Clang-Tidy in the next chapter, it’s worth noting that it’s more than just a linter. It offers a plethora of checks for not just syntactic sugar but also semantic analysis and readability. One of its most useful features in the context of naming conventions is the identifier naming check. By configuring this check, you can enforce project-wide rules for naming various entities...