Skip to content

Commit c2c9412

Browse files
authored
Merge pull request #5033 from Omotola/clang-tidy-update
Update clang-tidy.md
2 parents cddba6b + 6cbac18 commit c2c9412

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/code-quality/clang-tidy.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Using Clang-Tidy in Visual Studio
33
description: "How to use Clang-Tidy in Visual Studio for Microsoft C++ code analysis."
44
ms.date: 03/1/2022
55
ms.topic: "conceptual"
6-
f1_keywords: ["vs.codeanalysis.clangtidy"]
6+
f1_keywords: ["vs.codeanalysis.clangtidy","vs.codeanalysis.propertypages.ClangTidyToolPath"]
77
---
88
# Using Clang-Tidy in Visual Studio
99

@@ -90,6 +90,10 @@ Clang-Tidy runs result in warnings displayed in the Error List, and as in-editor
9090

9191
By default, Clang-Tidy does not set any checks when enabled. To see the list of checks in the command-line version, run `clang-tidy -list-checks` in a developer command prompt. You can configure the checks that Clang-Tidy runs inside Visual Studio. In the project Property Pages dialog, open the **Configuration Properties** > **Code Analysis** > **Clang-Tidy** page. Enter checks to run in the **Clang-Tidy Checks** property. A good default set is `clang-analyzer-*`. This property value is provided to the **`--checks`** argument of the tool. Any further configuration can be included in custom *`.clang-tidy`* files. For more information, see the [Clang-Tidy documentation on LLVM.org](https://clang.llvm.org/extra/clang-tidy/).
9292

93+
## Clang-Tidy Tool Directory
94+
95+
If you'd like to have custom rules built into your clang-tidy executable and run it in Microsoft Visual Studio, you can change the path to the executable that Visual Studio runs. In the project Property Pages dialog, open the **Configuration Properties** > **Code Analysis** > **Clang-Tidy** page. Manually type in the path or **Browse** and select the path under the **Clang-Tidy Tool Directory** property. The new executable is used once the change is saved, and the app is recompiled.
96+
9397
## See also
9498

9599
[Clang/LLVM support for MSBuild projects](https://devblogs.microsoft.com/cppblog/clang-llvm-support-for-msbuild-projects/)\

0 commit comments

Comments
 (0)