|
1 | 1 | --- |
2 | 2 | title: Using Clang-Tidy in Visual Studio |
3 | 3 | description: "How to use Clang-Tidy in Visual Studio for Microsoft C++ code analysis." |
4 | | -ms.date: 02/22/2022 |
| 4 | +ms.date: 03/1/2022 |
5 | 5 | ms.topic: "conceptual" |
6 | 6 | f1_keywords: ["vs.codeanalysis.clangtidy"] |
7 | 7 | --- |
@@ -31,13 +31,13 @@ For more information, see [How to: Set Code Analysis Properties for C/C++ Projec |
31 | 31 |
|
32 | 32 | ## CMake |
33 | 33 |
|
34 | | -In CMake projects, you can configure Clang-Tidy checks within *`CMakeSettings.json`* or *`CMakePresets.json`*. |
| 34 | +In CMake projects, you can configure Clang-Tidy checks within *`CMakeSettings.json`* or *`CMakePresets.json`*. |
35 | 35 |
|
36 | 36 | Clang-Tidy recognizes the following keys: |
37 | 37 |
|
38 | 38 | - `enableMicrosoftCodeAnalysis`: Enables Microsoft Code Analysis |
39 | 39 | - `enableClangTidyCodeAnalysis`: Enables Clang-Tidy analysis |
40 | | -- `clangTidyChecks`: Clang-Tidy configuration. A comma-separated list of checks to enable or disable. A leading `-` disables the check. For example, "cert-oop58-cpp, -cppcoreguidelines-no-malloc, google-runtime-int" enables `cert-oop58-cpp` and `google-runtime-int`, but disables `cppcoreguidelines-no-malloc`. |
| 40 | +- `clangTidyChecks`: Clang-Tidy configuration. A comma-separated list of checks to enable or disable. A leading `-` disables the check. For example, "cert-oop58-cpp, -cppcoreguidelines-no-malloc, google-runtime-int" enables `cert-oop58-cpp` and `google-runtime-int`, but disables `cppcoreguidelines-no-malloc`. For a list of Clang-Tidy checks, see the [Clang-Tidy documentation](https://clang.llvm.org/extra/clang-tidy/checks/list.html). |
41 | 41 |
|
42 | 42 | If neither of the "enable" options are specified, Visual Studio will select the analysis tool matching the Platform Toolset used. |
43 | 43 |
|
@@ -93,7 +93,7 @@ By default, Clang-Tidy does not set any checks when enabled. To see the list of |
93 | 93 |
|
94 | 94 | ## See also |
95 | 95 |
|
96 | | -- [Clang/LLVM support for MSBuild projects](https://devblogs.microsoft.com/cppblog/clang-llvm-support-for-msbuild-projects/) |
97 | | -- [Clang/LLVM support for CMake projects](https://devblogs.microsoft.com/cppblog/visual-studio-cmake-support-clang-llvm-cmake-3-14-vcpkg-and-performance-improvements/) |
| 96 | +[Clang/LLVM support for MSBuild projects](https://devblogs.microsoft.com/cppblog/clang-llvm-support-for-msbuild-projects/)\ |
| 97 | +[Clang/LLVM support for CMake projects](https://devblogs.microsoft.com/cppblog/visual-studio-cmake-support-clang-llvm-cmake-3-14-vcpkg-and-performance-improvements/) |
98 | 98 |
|
99 | 99 | ::: moniker-end |
0 commit comments