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/code-analysis-warnings-for-managed-code-by-checkid.md
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -265,8 +265,6 @@ ms.workload:
265
265
266
266
The following table lists Code Analysis warnings for managed code by the CheckId identifier of the warning.
267
267
268
-
## Warnings
269
-
270
268
|CheckId|Warning|Description|
271
269
|-------------|-------------|-----------------|
272
270
|CA1000|[CA1000: Do not declare static members on generic types](../code-quality/ca1000-do-not-declare-static-members-on-generic-types.md)|When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused.|
Copy file name to clipboardExpand all lines: docs/code-quality/demo-sample.md
+43-43Lines changed: 43 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Demo Sample
2
+
title: Sample C++ project for code analysis
3
3
ms.date: 11/04/2016
4
4
ms.prod: visual-studio-dev15
5
5
ms.technology: vs-ide-code-analysis
@@ -10,57 +10,57 @@ helpviewer_keywords:
10
10
ms.assetid: 09e1b9f7-5916-4ed6-a001-5c2d7e710682
11
11
author: mikeblome
12
12
ms.author: mblome
13
-
manager: douge
13
+
manager: wpickett
14
14
ms.workload:
15
15
- "multiple"
16
16
---
17
-
# Demo Sample
17
+
# Sample C++ project for code analysis
18
18
19
-
This following procedures show you how to create the sample for [Walkthrough: Analyzing C/C++ Code for Defects](../code-quality/walkthrough-analyzing-c-cpp-code-for-defects.md). The procedures create:
19
+
This following procedures show you how to create the sample for [Walkthrough: Analyze C/C++ code for defects](../code-quality/walkthrough-analyzing-c-cpp-code-for-defects.md). The procedures create:
20
20
21
-
- A [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] solution named CppDemo.
21
+
-A Visual Studio solution named CppDemo.
22
22
23
-
-A static library project named CodeDefects.
23
+
- A static library project named CodeDefects.
24
24
25
-
-A static library project named Annotations.
25
+
- A static library project named Annotations.
26
26
27
-
The procedures also provide the code for the header and .cpp files for the static libraries.
27
+
The procedures also provide the code for the header and *.cpp* files for the static libraries.
28
28
29
29
## Create the CppDemo solution and the CodeDefects project
30
30
31
-
1.Click the **File** menu, point to **New**, and then click **New Project**.
31
+
1. Click the **File** menu, point to **New**, and then click **New Project**.
32
32
33
-
2.In the **Project types** tree list, if Visual C++ is not your default language in VS expand **Other Languages**.
33
+
2. In the **Project types** tree list, if Visual C++ is not your default language in VS expand **Other Languages**.
34
34
35
-
3.Expand **Visual C++**, and then click **General**.
35
+
3. Expand **Visual C++**, and then click **General**.
36
36
37
-
4.In **Templates**, click **Empty Project**.
37
+
4. In **Templates**, click **Empty Project**.
38
38
39
-
5.In the **Name** text box, type **CodeDefects**.
39
+
5. In the **Name** text box, type **CodeDefects**.
40
40
41
-
6.Select the **Create directory for solution** check box.
41
+
6. Select the **Create directory for solution** check box.
42
42
43
-
7.In the **Solution Name** text box, type **CppDemo**.
43
+
7. In the **Solution Name** text box, type **CppDemo**.
44
44
45
45
## Configure the CodeDefects project as a static library
46
46
47
-
1.In Solution Explorer, right-click **CodeDefects** and then click **Properties**.
47
+
1. In Solution Explorer, right-click **CodeDefects** and then click **Properties**.
48
48
49
-
2.Expand **Configuration Properties** and then click **General**.
49
+
2. Expand **Configuration Properties** and then click **General**.
50
50
51
-
3.In the **General** list, select the text in the column next to **Target Extension**, and then type **.lib**.
51
+
3. In the **General** list, select the text in the column next to **Target Extension**, and then type **.lib**.
52
52
53
-
4.In **Project Defaults**, click the column next to **Configuration Type**, and then click **Static Lib (.lib)**.
53
+
4. In **Project Defaults**, click the column next to **Configuration Type**, and then click **Static Lib (.lib)**.
54
54
55
55
## Add the header and source file to the CodeDefects project
56
56
57
-
1.In Solution Explorer, expand **CodeDefects**, right-click **Header Files**, click **Add**, and then click **New Item**.
57
+
1. In Solution Explorer, expand **CodeDefects**, right-click **Header Files**, click **Add**, and then click **New Item**.
58
58
59
-
2.In the **Add New Item** dialog box, click **Code**, and then click **Header File (.h)**.
59
+
2. In the **Add New Item** dialog box, click **Code**, and then click **Header File (.h)**.
60
60
61
-
3.In the **Name** box, type **Bug.cpp** and then click **Add**.
61
+
3. In the **Name** box, type **Bug.h** and then click **Add**.
62
62
63
-
4.Copy the following code and paste it into the **Bug.cpp** file in the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] editor.
63
+
4. Copy the following code and paste it into the *Bug.h* file in the Visual Studio editor.
64
64
65
65
```cpp
66
66
#include<windows.h>
@@ -82,13 +82,13 @@ This following procedures show you how to create the sample for [Walkthrough: An
82
82
const int ACCOUNT_DOMAIN_LEN = 128;
83
83
```
84
84
85
-
5.In Solution Explorer, right-click **Source Files**, point to **New**, and then click **New Item**.
85
+
5. In Solution Explorer, right-click **Source Files**, point to **New**, and then click **New Item**.
86
86
87
-
6.In the **Add New Item** dialog box, click **C++ File (.cpp)**
87
+
6. In the **Add New Item** dialog box, click **C++ File (.cpp)**
88
88
89
-
7.In the **Name** box, type **Bug.cpp** and then click **Add**.
89
+
7. In the **Name** box, type **Bug.cpp** and then click **Add**.
90
90
91
-
8.Copy the following code and paste it into the Bug.h file in the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] editor.
91
+
8. Copy the following code and paste it into the *Bug.cpp* file in the Visual Studio editor.
92
92
93
93
```cpp
94
94
#include<stdlib.h>
@@ -152,29 +152,29 @@ This following procedures show you how to create the sample for [Walkthrough: An
152
152
153
153
## Add the Annotations project and configure it as a static library
154
154
155
-
1.In Solution Explorer, click **CppDemo**, point to **Add**, and then click **New Project**.
155
+
1. In Solution Explorer, click **CppDemo**, point to **Add**, and then click **New Project**.
156
156
157
-
2.In the **Add New Project** dialog box, expand Visual C++, click **General**, and then click **Empty Project**.
157
+
2. In the **Add New Project** dialog box, expand Visual C++, click **General**, and then click **Empty Project**.
158
158
159
-
3.In the **Name** text box, type **Annotations**, and then click **Add**.
159
+
3. In the **Name** text box, type **Annotations**, and then click **Add**.
160
160
161
-
4.In Solution Explorer, right-click **Annotations** and then click **Properties**.
161
+
4. In Solution Explorer, right-click **Annotations** and then click **Properties**.
162
162
163
-
5.Expand **Configuration Properties** and then click **General**.
163
+
5. Expand **Configuration Properties** and then click **General**.
164
164
165
-
6.In the **General** list, select the text in the column next to **Target Extension**, and then type **.lib**.
165
+
6. In the **General** list, select the text in the column next to **Target Extension**, and then type **.lib**.
166
166
167
-
7.In **Project Defaults**, click the column next to **Configuration Type**, and then click **Static Lib (.lib)**.
167
+
7. In **Project Defaults**, click the column next to **Configuration Type**, and then click **Static Lib (.lib)**.
168
168
169
169
## Add the header file and source file to the Annotations project
170
170
171
-
1.In Solution Explorer, expand **Annotations**, right-click **Header Files**, click **Add**, and then click **New Item**.
171
+
1. In Solution Explorer, expand **Annotations**, right-click **Header Files**, click **Add**, and then click **New Item**.
172
172
173
-
2.In the **Add New Item** dialog box, click **Header File (.h)**.
173
+
2. In the **Add New Item** dialog box, click **Header File (.h)**.
174
174
175
-
3.In the **Name** box, type **annotations.h** and then click **Add**.
175
+
3. In the **Name** box, type **annotations.h** and then click **Add**.
176
176
177
-
4.Copy the following code and paste it into the **annotations.h** file in the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] editor.
177
+
4. Copy the following code and paste it into the *annotations.h* file in the Visual Studio editor.
178
178
179
179
```cpp
180
180
#include<CodeAnalysis/SourceAnnotations.h>
@@ -191,13 +191,13 @@ This following procedures show you how to create the sample for [Walkthrough: An
191
191
192
192
```
193
193
194
-
5.In Solution Explorer, right-click **Source Files**, point to **New**, and then click **New Item**.
194
+
5. In Solution Explorer, right-click **Source Files**, point to **New**, and then click **New Item**.
195
195
196
-
6.In the **Add New Item** dialog box, click **Code** and then click **C++ File (.cpp)**
196
+
6. In the **Add New Item** dialog box, click **Code** and then click **C++ File (.cpp)**
197
197
198
-
7.In the **Name** box, type **annotations.cpp** and then click **Add**.
198
+
7. In the **Name** box, type **annotations.cpp** and then click **Add**.
199
199
200
-
8.Copy the following code and paste it into the **annotations.cpp** file in the [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] editor.
200
+
8. Copy the following code and paste it into the *annotations.cpp* file in the Visual Studio editor.
201
201
202
202
```cpp
203
203
#include<CodeAnalysis/SourceAnnotations.h>
@@ -226,4 +226,4 @@ This following procedures show you how to create the sample for [Walkthrough: An
226
226
227
227
```
228
228
229
-
9. Click the **File** menu, and then click **Save All**.
229
+
9. Click the **File** menu, and then click **Save All**.
Copy file name to clipboardExpand all lines: docs/code-quality/how-to-create-or-update-standard-code-analysis-check-in-policies.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "How to: Create or Update Standard Code Analysis Check-in Policies"
2
+
title: "Create or Update Standard Code Analysis Check-in Policies"
3
3
ms.date: 11/04/2016
4
4
ms.prod: visual-studio-dev15
5
5
ms.technology: vs-ide-code-analysis
@@ -29,7 +29,7 @@ Code analysis check-in policies are set in the team project settings and apply t
29
29
30
30
After you specify a check-in policy for managed code, team members can synchronize their code analysis settings for code projects to the team project policy settings.
31
31
32
-
###To open the check-in policy editor
32
+
## To open the check-in policy editor
33
33
34
34
1. In Team Explorer, right-click the team project name, point to **Team Project Settings**, and then click **Source Control**.
35
35
@@ -41,28 +41,28 @@ After you specify a check-in policy for managed code, team members can synchroni
41
41
42
42
- Double-click the existing **Code Analysis** item in the **Policy Type** list to change the policy.
43
43
44
-
###To set policy options
44
+
## To set policy options
45
45
46
46
Select or clear the following options:
47
47
48
-
|Option|Description|
49
-
|------------|-----------------|
50
-
|**Enforce check-in to only contain files that are part of current solution.**|Code analysis can run only on files specified in solution and project configuration files. This policy guarantees that all code that is part of a solution is analyzed.|
51
-
|**Enforce C/C++ Code Analysis (/analyze)**|Requires that all C or C++ projects be built with the /analyze compiler option to run code analysis before they can be checked in.|
52
-
|**Enforce Code Analysis for Managed Code**|Requires that all managed projects run code analysis and build before they can be checked in.|
48
+
|Option|Description|
49
+
|------------|-----------------|
50
+
|**Enforce check-in to only contain files that are part of current solution.**|Code analysis can run only on files specified in solution and project configuration files. This policy guarantees that all code that is part of a solution is analyzed.|
51
+
|**Enforce C/C++ Code Analysis (/analyze)**|Requires that all C or C++ projects be built with the /analyze compiler option to run code analysis before they can be checked in.|
52
+
|**Enforce Code Analysis for Managed Code**|Requires that all managed projects run code analysis and build before they can be checked in.|
53
53
54
-
###To specify a managed rule set
54
+
## To specify a managed rule set
55
55
56
-
-From the **Run this rule set** list, use one of the following methods:
56
+
From the **Run this rule set** list, use one of the following methods:
57
57
58
-
- Select a Microsoft standard rule set.
58
+
- Select a Microsoft standard rule set.
59
59
60
-
- To select a custom rule set, click **\<Select Rule Set from Source Control...>**, and then type the version control path of the rule set in the source control browser. The syntax of a version control path is:
60
+
- Select a custom rule set by clicking **\<Select Rule Set from Source Control...>**. Then, type the version control path of the rule set in the source control browser. The syntax of a version control path is:
61
61
62
-
-**$/**`TeamProjectName`**/**`VersionControlPath`
62
+
**$/**`TeamProjectName`**/**`VersionControlPath`
63
63
64
-
-For more information about how to create and implement a custom check-in policy rule set, see [Implementing Custom Check-in Policies for Managed Code](../code-quality/implementing-custom-code-analysis-check-in-policies-for-managed-code.md).
64
+
For more information about how to create and implement a custom check-in policy rule set, see [Implement Custom Check-in Policies for Managed Code](../code-quality/implementing-custom-code-analysis-check-in-policies-for-managed-code.md).
65
65
66
66
## See also
67
67
68
-
[Creating and Using Code Analysis Check-In Policies](../code-quality/creating-and-using-code-analysis-check-in-policies.md)
68
+
-[Create and use code analysis check-in policies](../code-quality/creating-and-using-code-analysis-check-in-policies.md)
Copy file name to clipboardExpand all lines: docs/data-tools/customize-how-visual-studio-creates-captions-for-data-bound-controls.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ ms.workload:
17
17
- "data-storage"
18
18
---
19
19
# Customize how Visual Studio creates captions for data-bound controls
20
+
20
21
When you drag items from the [Data Sources Window](add-new-data-sources.md) onto a designer, a special consideration comes into play: the column names in the caption labels are reformatted into a more readable string when two or more words are found to be concatenated together. You can customize the way in which these labels are created, by setting the **SmartCaptionExpression**, **SmartCaptionReplacement**, and **SmartCaptionSuffix** values in the **HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0\Data Designers** registry key.
21
22
22
23
> [!NOTE]
@@ -43,15 +44,15 @@ The following table lists the internal default settings for these registry value
43
44
> [!CAUTION]
44
45
> You should be very careful when doing anything in the Registry Editor. Back up the registry before editing it. If you use the Registry Editor incorrectly, you can cause serious problems that may require you to reinstall your operating system. Microsoft does not guarantee that problems that you cause by using the Registry Editor incorrectly can be resolved. Use the Registry Editor at your own risk.
45
46
>
46
-
> The following KnowledgeBase article contains instructions for backing up, editing, and restoring the registry: [Description of the Microsoft Windows registry](http://support.microsoft.com/default.aspx?scid=kb;en-us;256986) (http://support.microsoft.com/default.aspx?scid=kb;en-us;256986)
47
+
> The following KnowledgeBase article contains instructions for backing up, editing, and restoring the registry: [Description of the Microsoft Windows registry](http://support.microsoft.com/default.aspx?scid=kb;en-us;256986) (http://support.microsoft.com/default.aspx?scid=kb;en-us;256986)
47
48
48
-
### To modify the smart captioning behavior of the Data Sources window
49
+
##Modify the smart captioning behavior of the Data Sources window
49
50
50
51
1. Open a command window by clicking **Start** and then **Run**.
51
52
52
53
2. Type `regedit` in the **Run** dialog box, and click **OK**.
53
54
54
-
3. Expand the **HKEY_CURRENT_USER**, **Software*, **Microsoft**, **VisualStudio** node.
55
+
3. Expand the **HKEY_CURRENT_USER**, **Software**, **Microsoft**, **VisualStudio** node.
55
56
56
57
7. Right-click the **15.0** node, and create a new **Key** named `Data Designers`.
57
58
@@ -75,7 +76,7 @@ The following table lists the internal default settings for these registry value
75
76
76
77
The next time you drag items from the **Data Sources** window, the caption labels are created using the new registry values provided.
77
78
78
-
### To turn off the smart captioning feature
79
+
##Turn off the smart captioning feature
79
80
80
81
1. Open a command window by clicking **Start** and then **Run**.
0 commit comments