Skip to content

Commit 2087fd8

Browse files
author
JiayueHu
authored
Merge pull request #1454 from MicrosoftDocs/master
2/15 am publishing
2 parents e5bd950 + 490a8a4 commit 2087fd8

20 files changed

+152
-270
lines changed

.openpublishing.redirection.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
"redirect_url": "/visualstudio/code-quality/code-analysis-for-c-cpp-overview",
1616
"redirect_document_id": false
1717
},
18+
{
19+
"source_path": "docs/code-quality/creating-and-using-code-analysis-check-in-policies.md",
20+
"redirect_url": "/visualstudio/code-quality/how-to-create-or-update-standard-code-analysis-check-in-policies",
21+
"redirect_document_id": false
22+
},
23+
{
24+
"source_path": "docs/code-quality/enhancing-code-quality-with-team-project-check-in-policies.md",
25+
"redirect_url": "/visualstudio/code-quality/how-to-create-or-update-standard-code-analysis-check-in-policies",
26+
"redirect_document_id": false
27+
},
1828
{
1929
"source_path": "docs/code-quality/how-to-suppress-warnings-by-using-the-menu-item.md",
2030
"redirect_url": "/visualstudio/code-quality/in-source-suppression-overview",
@@ -1998,17 +2008,17 @@
19982008
},
19992009
{
20002010
"source_path": "docs/ide/reference/proxy-authorization-required.md",
2001-
"redirect_url": "visualstudio/install/troubleshooting-network-related-errors-in-visual-studio",
2011+
"redirect_url": "/visualstudio/install/troubleshooting-network-related-errors-in-visual-studio",
20022012
"redirect_document_id": false
20032013
},
20042014
{
20052015
"source_path": "docs/ide/whitelisting-urls-in-a-private-network.md",
2006-
"redirect_url": "visualstudio/install/install-and-use-visual-studio-behind-a-firewall-or-proxy-server",
2016+
"redirect_url": "/visualstudio/install/install-and-use-visual-studio-behind-a-firewall-or-proxy-server",
20072017
"redirect_document_id": false
20082018
},
20092019
{
20102020
"source_path": "docs/install/install-visual-studio-behind-a-firewall-or-proxy-server.md",
2011-
"redirect_url": "visualstudio/install/install-and-use-visual-studio-behind-a-firewall-or-proxy-server",
2021+
"redirect_url": "/visualstudio/install/install-and-use-visual-studio-behind-a-firewall-or-proxy-server",
20122022
"redirect_document_id": false
20132023
}
20142024
]

docs/code-quality/TOC.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@
5656
#### [Native Minimum Rules rule set](native-minimum-rules-rule-set.md)
5757
#### [Native Recommended Rules rule set](native-recommended-rules-rule-set.md)
5858
#### [Security Rules rule set for managed code](security-rules-rule-set-for-managed-code.md)
59-
## [Enhance Code Quality with Team Project Check-in Policies](enhancing-code-quality-with-team-project-check-in-policies.md)
60-
### [Create and Use Code Analysis Check-In Policies](creating-and-using-code-analysis-check-in-policies.md)
61-
#### [Create or Update Standard Code Analysis Check-in Policies](how-to-create-or-update-standard-code-analysis-check-in-policies.md)
62-
#### [Implement Custom Code Analysis Check-in Policies for Managed Code](implementing-custom-code-analysis-check-in-policies-for-managed-code.md)
63-
#### [Enforce Maintainable Code with a Code Analysis Check-in Policy](how-to-enforce-maintainable-code-with-a-code-analysis-check-in-policy.md)
64-
#### [Version Compatibility for Code Analysis Check-In Policies](version-compatibility-for-code-analysis-check-in-policies.md)
59+
## [Create Code Analysis Check-in Policies](how-to-create-or-update-standard-code-analysis-check-in-policies.md)
60+
### [Implement Custom Code Analysis Check-in Policies for Managed Code](implementing-custom-code-analysis-check-in-policies-for-managed-code.md)
61+
### [Enforce Maintainable Code](how-to-enforce-maintainable-code-with-a-code-analysis-check-in-policy.md)
62+
### [Version Compatibility](version-compatibility-for-code-analysis-check-in-policies.md)
6563
## Code Metrics
6664
### [Generate Code Metrics Data](how-to-generate-code-metrics-data.md)
6765
### [Work with Code Metrics Data](working-with-code-metrics-data.md)

docs/code-quality/creating-and-using-code-analysis-check-in-policies.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

docs/code-quality/enhancing-code-quality-with-team-project-check-in-policies.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

docs/code-quality/how-to-enforce-maintainable-code-with-a-code-analysis-check-in-policy.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,59 @@ ms.custom: ""
44
ms.date: "11/04/2016"
55
ms.reviewer: ""
66
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-code-analysis"
7+
ms.technology: vs-ide-code-analysis
98
ms.tgt_pltfrm: ""
109
ms.topic: "article"
11-
helpviewer_keywords:
10+
helpviewer_keywords:
1211
- "code analysis, check-in policies"
1312
ms.assetid: d1b3b04f-4dd9-40e6-b2d4-b414d33fb647
14-
caps.latest.revision: 8
1513
author: "gewarren"
1614
ms.author: "gewarren"
1715
manager: ghogen
18-
ms.workload:
16+
ms.workload:
1917
- "multiple"
2018
---
2119
# How to: Enforce Maintainable Code with a Code Analysis Check-in Policy
22-
Developers can use the Code Metrics tool to measure the complexity and maintainability of their code, but they cannot invoke code metrics as part of a check-in policy. However, a team can enable Code Analysis rules that verify the compliance of their code with Code Metrics standards and enforce the rules through check-in policies. For more information about code metrics, see the [Code Metrics Values](../code-quality/code-metrics-values.md).
23-
24-
Developers can enable the Depth of Inheritance, Class Coupling, Maintainability Index, and Complexity rules to enforce maintainable code through Code Analysis check-in policies. All four of these rules are found under the "Maintainability Rules" category in the Code Analysis policy editor.
25-
26-
Administrators of version control for [!INCLUDE[esprfound](../code-quality/includes/esprfound_md.md)] can add the Code Analysis Maintainability Rules to the check-in policy requirements. These check-in policies require developers to run Code Analysis based on these rule changes before initiating a check-in.
27-
28-
### To open the Code Analysis Policy Editor
29-
30-
1. In **Team Explorer**, right-click the team project, click **Team Project Settings**, and then click **Source Control**.
31-
32-
The **Source Control** dialog box appears.
33-
34-
2. On the **Check-in Policy** tab, and click **Add**.
35-
36-
The **Add Check-in Policy** dialog box appears.
37-
38-
3. In the **Check-in Policy** list, select the **Code Analysis** check box, and then click **OK**.
39-
40-
The **Code Analysis Policy Editor** dialog box appears.
41-
42-
### To enable Code Analysis Maintainability Rules
43-
44-
1. In the **Code Analysis Policy Editor** dialog box, under **Rule Settings**, expand the **Maintainability Rules** node.
45-
46-
2. Select the check boxes for the following rules:
47-
48-
- Depth of Inheritance: **CA1501 AvoidExcessiveInheritance** - Threshold: Warning at more than 5 levels deep
49-
50-
- Complexity: **CA1502 AvoidExcessiveComplexity** - Threshold: Warning at more than 25
51-
52-
- Maintainability Index: **CA1505 AvoidUnmaintainableCode** - Threshold: Warning at fewer than 20
53-
54-
- Class Coupling: **CA1506 AvoidExcessiveClassCoupling** - Threshold: Warning at more than 80 for a class and more than 30 for a method
55-
56-
- In addition, if you want a rule violation to prevent a build, select the **Treat Warning As An Error** check box next to the rule description.
57-
58-
3. Click **OK**. The new check-in policy now applies to future check-ins.
59-
60-
## See Also
61-
[Code Metrics Values](../code-quality/code-metrics-values.md)
62-
[Creating and Using Code Analysis Check-In Policies](../code-quality/creating-and-using-code-analysis-check-in-policies.md)
20+
21+
Developers can use the Code Metrics tool to measure the complexity and maintainability of their code, but you cannot invoke code metrics as part of a check-in policy. However, you can enable Code Analysis rules that verify the compliance of your code with Code Metrics standards, and enforce the rules through check-in policies. For more information about code metrics, see the [Code Metrics values](../code-quality/code-metrics-values.md).
22+
23+
You can enable the Depth of Inheritance, Class Coupling, Maintainability Index, and Complexity rules to enforce maintainable code through a Code Analysis check-in policy. All four of these rules are found under the "Maintainability Rules" category in the Code Analysis policy editor.
24+
25+
Administrators of version control for Team Foundation can add the Code Analysis Maintainability Rules to the check-in policy requirements. These check-in policies require developers to run Code Analysis based on these rule changes before initiating a check-in.
26+
27+
## To open the Code Analysis Policy Editor
28+
29+
1.In **Team Explorer**, right-click the team project, click **Team Project Settings**, and then click **Source Control**.
30+
31+
The **Source Control** dialog box appears.
32+
33+
2.On the **Check-in Policy** tab, and click **Add**.
34+
35+
The **Add Check-in Policy** dialog box appears.
36+
37+
3.In the **Check-in Policy** list, select the **Code Analysis** check box, and then click **OK**.
38+
39+
The **Code Analysis Policy Editor** dialog box appears.
40+
41+
## To enable Code Analysis Maintainability Rules
42+
43+
1.In the **Code Analysis Policy Editor** dialog box, under **Rule Settings**, expand the **Maintainability Rules** node.
44+
45+
2.Select the check boxes for the following rules:
46+
47+
- Depth of Inheritance: **CA1501 AvoidExcessiveInheritance** - Threshold: Warning at more than 5 levels deep
48+
49+
- Complexity: **CA1502 AvoidExcessiveComplexity** - Threshold: Warning at more than 25
50+
51+
- Maintainability Index: **CA1505 AvoidUnmaintainableCode** - Threshold: Warning at fewer than 20
52+
53+
- Class Coupling: **CA1506 AvoidExcessiveClassCoupling** - Threshold: Warning at more than 80 for a class and more than 30 for a method
54+
55+
In addition, if you want a rule violation to prevent a successful build, select the **Treat Warning As An Error** check box next to the rule description.
56+
57+
3.Click **OK**. The new check-in policy now applies to future check-ins.
58+
59+
## See also
60+
61+
[Code Metrics Values](../code-quality/code-metrics-values.md)
62+
[Creating and Using Code Analysis Check-In Policies](../code-quality/creating-and-using-code-analysis-check-in-policies.md)

docs/cross-platform/cross-platform-mobile-development-in-visual-studio.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,27 @@ manager: ghogen
1515
ms.workload:
1616
- "multiple"
1717
---
18-
# Cross-Platform Mobile Development in Visual Studio
19-
You can build apps for Android, iOS, and Windows devices by using Visual Studio. As you design your app, use tools in Visual Studio to easily add connected services such as Office 365, Azure App Service, and Application Insights.
20-
21-
Build your apps by using C# and the .NET Framework, HTML and JavaScript, or C++. Share code, strings, images, and in some cases even the user interface.
22-
23-
If you want to build a game or immersive graphical app, install Visual Studio tools for Unity and enjoy all of the powerful productivity features of Visual Studio with Unity, the popular cross-platform game/graphics engine and development environment for apps that run on iOS, Android, Windows, and other platforms.
24-
25-
**In this article:**
18+
# Cross-Platform mobile development in Visual Studio
2619

27-
- [Build an app for Android, iOS, and Windows (.NET Framework)](#NET)
28-
29-
- [Target Android, iOS, and Windows from a single code base](../cross-platform/cross-platform-mobile-development-in-visual-studio.md#AndroidHTML)
30-
31-
- [Target Windows 10 devices](../cross-platform/cross-platform-mobile-development-in-visual-studio.md#WindowsHTML)
20+
You can build apps for Android, iOS, and Windows devices by using Visual Studio. As you design your app, use tools in Visual Studio to easily add connected services such as Office 365, Azure App Service, and Application Insights.
3221

33-
- [Build an app for Android, iOS, and Windows (HTML/JavaScript)](#HTML)
22+
Build your apps by using C# and the .NET Framework, HTML and JavaScript, or C++. Share code, strings, images, and in some cases even the user interface.
3423

35-
- [Build an app for Android and Windows (C++)](#CPP)
24+
If you want to build a game or immersive graphical app, install Visual Studio tools for Unity and enjoy all of the powerful productivity features of Visual Studio with Unity, the popular cross-platform game/graphics engine and development environment for apps that run on iOS, Android, Windows, and other platforms.
3625

37-
- [Build a cross-platform game for Android, iOS, and Windows by using Visual Studio tools for Unity](#Unity)
26+
## Build an app for Android, iOS, and Windows (.NET Framework)
3827

39-
## <a name="NET"></a> Build an app for Android, iOS, and Windows (.NET Framework)
40-
![Devices](../cross-platform/media/homedevices.png "HomeDevices")
28+
![Devices](../cross-platform/media/homedevices.png "HomeDevices")
4129

42-
With Xamarin, you can target Android, iOS, and Windows in the same solution, sharing code and even UI.
30+
With Xamarin, you can target Android, iOS, and Windows in the same solution, sharing code and even UI.
4331

4432
|**Learn more**|
4533
|--------------------|
4634
|[Install Visual Studio](http://www.visualstudio.com/products/visual-studio-community-vs) (VisualStudio.com)|
4735
|[Learn about Xamarin in Visual Studio](http://www.visualstudio.com/explore/xamarin-vs) (VisualStudio.com)|
4836
|[Visual Studio and Xamarin](../cross-platform/visual-studio-and-xamarin.md) (MSDN Library)|
4937
|[Application Lifecycle Management (ALM) with Xamarin apps](../cross-platform/application-lifecycle-management-alm-with-xamarin-apps.md) (MSDN Library)|
50-
|[Learn about universal Windows apps in Visual Studio](https://www.visualstudio.com/vs/universal-windows-platform/) (VisualStudio.com)|
38+
|[Learn about Universal Windows apps in Visual Studio](https://www.visualstudio.com/vs/universal-windows-platform/) (VisualStudio.com)|
5139
|[Learn about the similarities between Swift and C#](http://aka.ms/scposter) (download.microsoft.com)|
5240
|[Learn about the Visual Studio Emulator for Android](http://www.visualstudio.com/explore/msft-android-emulator-vs) (VisualStudio.com)|
5341

4.4 KB
Loading
3.3 KB
Loading
Loading
42.3 KB
Loading
29 KB
Loading
35.3 KB
Loading
Loading

0 commit comments

Comments
 (0)