介绍
使用时,用-checks=选项来选择要运行的check,该选型用逗号分离每个check,如果在具体的check前面添加-号表示不使用该check。例如1 clang-tidy test.cpp -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus*
该命令表示禁止所有默认的chekcs(-*), 使用clang-analyzer-*除了clang-analyzer-cplusplus*以外的所有check
| Name prefix | Description |
|---|---|
| android- | Checks related to Android. |
| boost- | Checks related to Boost library. |
| bugprone- | Checks that target bugprone code constructs. |
| cert- | Checks related to CERT Secure Coding Guidelines. |
| cppcoreguidelines- | Checks related to C++ Core Guidelines. |
| clang-analyzer- | Clang Static Analyzer checks. |
| fuchsia- | Checks related to Fuchsia coding conventions. |
| google- | Checks related to Google coding conventions. |
| hicpp- | Checks related to High Integrity C++ Coding Standard. |
| llvm- | Checks related to the LLVM coding conventions. |
| misc- | Checks that we didn’t have a better category for. |
| modernize- | Checks that advocate usage of modern (currently “modern” means “C++11”) language constructs. |
| mpi- | Checks related to MPI (Message Passing Interface). |
| objc- | Checks related to Objective-C coding conventions. |
| performance- | Checks that target performance-related issues. |
| portability- | Checks that target portability-related issues that don’t relate to any particular coding style. |
| readability- | Checks that target readability-related issues that don’t relate to any particular coding style. |
安装
ubuntu下使用以下命令下载安装
|
|
cmake中使用
|
|