Abseil wants to help developers avoid common mistakes unique to our collection of libraries. Therefore, we have developed a set of clang-tidy checks for Abseil, allowing you to catch these errors early on before they become bigger problems.
Clang-Tidy) is a useful tool to help developers write C++ code in a correct and efficient manner. Clang-Tidy now supports a set of Abseil checks designed to diagnose and fix typical programming errors specific to Abseil including:
We hope that these checks will help projects that depend on Abseil have high standards of code quality.
Our checks can be found on llvm’s clang-tools-extra repository, in the clang-tidy/abseil directory. The following checks have been released:
For more information, consult Abseil’s Clang-Tidy Check Guide.
You can also write your own checks and share them with the Abseil community. For more information on clang-tidy, and if you are interested in learning more to get involved in writing your own Abseil clang-tidy checks, consult the Clang-Tidy documentation.