You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-quality/quick-start-code-analysis-for-c-cpp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ The Error List window lists the code analysis warnings found. The results are di
100
100
101
101
For detailed information about the warning, including possible solutions to the issue, choose the warning ID in the Code column to display its corresponding online help article.
102
102
103
-
Double-click a warning to move the cursor to the line of code that caused the warning in the Visual Studio code editor. Or, press Enter on the selected warning.
103
+
Double-click a warning to move the cursor to the line of code that caused the warning in the code editor. Or, press Enter on the selected warning.
104
104
105
105
After you understand the problem, you can resolve it in your code. Then, rerun code analysis to make sure that the warning no longer appears in the Error List.
Copy file name to clipboardExpand all lines: docs/code-quality/understanding-sal.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,9 +94,9 @@ These annotations help identify possible uninitialized values and invalid null p
94
94
95
95
This section shows code examples for the basic SAL annotations.
96
96
97
-
### Using the Visual Studio Code Analysis Tool to Find Defects
97
+
### Using the Visual Studio code analysis tool to find defects
98
98
99
-
In the examples, the Visual Studio Code Analysis tool is used together with SAL annotations to find code defects. Here's how to do that.
99
+
In the examples, the Visual Studio code analysis tool is used together with SAL annotations to find code defects. Here's how to do that.
100
100
101
101
#### To use Visual Studio code analysis tools and SAL
102
102
@@ -145,7 +145,7 @@ void BadInCaller()
145
145
}
146
146
```
147
147
148
-
If you use Visual Studio Code Analysis on this example, it validates that the callers pass a non-Null pointer to an initialized buffer for `pInt`. In this case, `pInt` pointer cannot be NULL.
148
+
If you use Visual Studio code analysis on this example, it validates that the callers pass a non-Null pointer to an initialized buffer for `pInt`. In this case, `pInt` pointer cannot be NULL.
149
149
150
150
### Example: The \_In\_opt\_ Annotation
151
151
@@ -172,7 +172,7 @@ void InOptCaller()
172
172
}
173
173
```
174
174
175
-
Visual Studio Code Analysis validates that the function checks for NULL before it accesses the buffer.
175
+
Visual Studio code analysis validates that the function checks for NULL before it accesses the buffer.
176
176
177
177
### Example: The \_Out\_ Annotation
178
178
@@ -198,7 +198,7 @@ void OutCaller()
198
198
}
199
199
```
200
200
201
-
Visual Studio Code Analysis Tool validates that the caller passes a non-NULL pointer to a buffer for `pInt` and that the buffer is initialized by the function before it returns.
201
+
Visual Studio code analysis validates that the caller passes a non-NULL pointer to a buffer for `pInt` and that the buffer is initialized by the function before it returns.
202
202
203
203
### Example: The \_Out\_opt\_ Annotation
204
204
@@ -225,7 +225,7 @@ void OutOptCaller()
225
225
}
226
226
```
227
227
228
-
Visual Studio Code Analysis validates that this function checks for NULL before `pInt` is dereferenced, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns.
228
+
Visual Studio code analysis validates that this function checks for NULL before `pInt` is dereferenced, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns.
229
229
230
230
### Example: The \_Inout\_ Annotation
231
231
@@ -256,7 +256,7 @@ void BadInOutCaller()
256
256
}
257
257
```
258
258
259
-
Visual Studio Code Analysis validates that callers pass a non-NULL pointer to an initialized buffer for `pInt`, and that, before return, `pInt` is still non-NULL and the buffer is initialized.
259
+
Visual Studio code analysis validates that callers pass a non-NULL pointer to an initialized buffer for `pInt`, and that, before return, `pInt` is still non-NULL and the buffer is initialized.
260
260
261
261
### Example: The \_Inout\_opt\_ Annotation
262
262
@@ -285,7 +285,7 @@ void InOutOptCaller()
285
285
}
286
286
```
287
287
288
-
Visual Studio Code Analysis validates that this function checks for NULL before it accesses the buffer, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns.
288
+
Visual Studio code analysis validates that this function checks for NULL before it accesses the buffer, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns.
289
289
290
290
### Example: The \_Outptr\_ Annotation
291
291
@@ -315,7 +315,7 @@ void OutPtrCaller()
315
315
}
316
316
```
317
317
318
-
Visual Studio Code Analysis validates that the caller passes a non-NULL pointer for `*pInt`, and that the buffer is initialized by the function before it returns.
318
+
Visual Studio code analysis validates that the caller passes a non-NULL pointer for `*pInt`, and that the buffer is initialized by the function before it returns.
319
319
320
320
### Example: The \_Outptr\_opt\_ Annotation
321
321
@@ -347,7 +347,7 @@ void OutPtrOptCaller()
347
347
}
348
348
```
349
349
350
-
Visual Studio Code Analysis validates that this function checks for NULL before `*pInt` is dereferenced, and that the buffer is initialized by the function before it returns.
350
+
Visual Studio code analysis validates that this function checks for NULL before `*pInt` is dereferenced, and that the buffer is initialized by the function before it returns.
351
351
352
352
### Example: The \_Success\_ Annotation in Combination with \_Out\_
353
353
@@ -366,7 +366,7 @@ bool GetValue(_Out_ int *pInt, bool flag)
366
366
}
367
367
```
368
368
369
-
The `_Out_` annotation causes Visual Studio Code Analysis to validate that the caller passes a non-NULL pointer to a buffer for `pInt`, and that the buffer is initialized by the function before it returns.
369
+
The `_Out_` annotation causes Visual Studio code analysis to validate that the caller passes a non-NULL pointer to a buffer for `pInt`, and that the buffer is initialized by the function before it returns.
Copy file name to clipboardExpand all lines: docs/code-quality/using-the-cpp-core-guidelines-checkers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -321,7 +321,7 @@ Because of the way the code analysis rules get loaded within Visual Studio 2015,
321
321
322
322
1. Select the Microsoft.CppCoreCheck package and then choose the **Install** button to add the rules to your project.
323
323
324
-
The NuGet package adds an MSBuild *`.targets`* file to your project that is invoked when you enable code analysis on your project. The *`.targets`* file adds the C++ Core Check rules as another extension to the Visual Studio Code analysis tool. When the package is installed, you can use the Property Pages dialog to enable or disable the released and experimental rules.
324
+
The NuGet package adds an MSBuild *`.targets`* file to your project that is invoked when you enable code analysis on your project. The *`.targets`* file adds the C++ Core Check rules as another extension to the Visual Studio code analysis tool. When the package is installed, you can use the Property Pages dialog to enable or disable the released and experimental rules.
0 commit comments