kvrocks
kvrocks copied to clipboard
Add clang tidy for static analysis
Search before asking
- [X] I had searched in the issues and found no similar issues.
Motivation
Clang tidy is a static analysis tool based on libclang, which itself is able to match problematic code patterns at the AST level. Its power lies in the ability to directly call checkers in Clang StaticAnalyzer that perform basic symbolic execution and constraint solving on the control flow graph converted directly from the Clang AST.
This allows clang tidy to check both code smell and some code safety issues such as memory leaks, null pointer dereferences or double frees in a more precise way (than cppcheck, cpplint, etc.). The full set of checkers in clang tidy can be viewed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html.
Solution
No response
Are you willing to submit a PR?
- [X] I'm willing to submit a PR!