Skip to content

Commit 2b2ad7d

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 78a70b1 + 122f658 commit 2b2ad7d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

docs/code-quality/using-the-cpp-core-guidelines-checkers.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Using the C++ Core Guidelines checkers
33
description: "How to set up and use the Microsoft C++ Code Analysis rules for C++ Core Guidelines."
4-
ms.date: 12/16/2020
4+
ms.date: 06/21/2023
55
ms.topic: "conceptual"
66
dev_langs:
77
- CPP
@@ -231,9 +231,9 @@ You can use the command-line option to temporarily disable all code analysis for
231231

232232
Sometimes it's useful to do focused code analysis and still use the Visual Studio IDE. Try the following sample scenario for large projects. It can save build time and make it easier to filter results:
233233

234-
1. In the command shell, set the `esp.extension` and `esp.annotationbuildlevel` environment variables.
234+
1. In the command shell, set the `esp.extension` environment variable.
235235

236-
1. To inherit these variables, open Visual Studio from the command shell.
236+
1. To inherit this variable, open Visual Studio from the command shell.
237237

238238
1. Load your project and open its properties.
239239

@@ -269,10 +269,6 @@ You can run the C++ Core Checker only on specified files. Use the same approach
269269

270270
```xml
271271
<ItemGroup>
272-
<BuildMacro Include="Esp_AnnotationBuildLevel">
273-
<EnvironmentVariable>true</EnvironmentVariable>
274-
<Value>Ignore</Value>
275-
</BuildMacro>
276272
<BuildMacro Include="Esp_Extensions">
277273
<EnvironmentVariable>true</EnvironmentVariable>
278274
<Value>CppCoreCheck.dll</Value>
@@ -294,7 +290,7 @@ Code Analysis requires a few environment variables and compiler command-line opt
294290

295291
- **Environment variables**
296292
- `set esp.extensions=cppcorecheck.dll` This tells the engine to load the C++ Core Guidelines module.
297-
- `set esp.annotationbuildlevel=ignore` This disables the logic that processes SAL annotations. Annotations don't affect code analysis in the C++ Core Guidelines Checker, yet their processing takes time (sometimes a long time). This setting is optional, but highly recommended.
293+
- Since Visual Studio 2019 we no longer recommend setting the `esp.annotationbuildlevel` environment variable because setting it can result in false positives. If seeing unexpected results, remove this variable from your environment.
298294
- `set caexcludepath=%include%` We highly recommend that you disable warnings that fire on standard headers. You can add more paths here, for example the path to the common headers in your project.
299295

300296
- **Command-line options**

0 commit comments

Comments
 (0)