5.5 Summary
In this chapter, we delved into Clang-Tidy, a robust tool for code analysis. We explored its configuration, execution, and internal architecture. Additionally, we developed a custom Clang-Tidy check to assess class complexity. Our check utilized basic AST matchers, akin to regular expressions within the AST. For complexity determination, we employed a simple method. More sophisticated metrics, such as cyclomatic complexity, demand tools such as Control Flow Graphs (CFGs). The adventure continues in the next chapter, where we’ll dive deep into designing intricate checks using CFG.