kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Add clang tidy for static analysis

Open PragmaTwice opened this issue 3 years ago • 0 comments

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!

PragmaTwice avatar May 23 '22 06:05 PragmaTwice