Skip to content

Commit 536d766

Browse files
authored
Merge pull request #1525 from gewarren/gewarren-codemetrics
Add links to Code Metrics topic
2 parents dfd09e8 + fe19be5 commit 536d766

4 files changed

+34
-26
lines changed

docs/code-quality/code-metrics-values.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ ms.suite: ""
77
ms.technology: vs-ide-code-analysis
88
ms.tgt_pltfrm: ""
99
ms.topic: "article"
10-
helpviewer_keywords:
10+
helpviewer_keywords:
1111
- "code metrics [Visual Studio]"
1212
author: "gewarren"
1313
ms.author: "gewarren"
1414
manager: ghogen
15-
ms.workload:
15+
ms.workload:
1616
- "multiple"
1717
---
1818
# Code metrics values
@@ -21,9 +21,11 @@ The increased complexity of modern software applications also increases the diff
2121

2222
Developers can use Visual Studio to generate code metrics data that measure the complexity and maintainability of their managed code. Code metrics data can be generated for an entire solution or a single project.
2323

24+
For information about how to generate code metrics data in Visual Studio, see [How to: Generate code metrics data](../code-quality/how-to-generate-code-metrics-data.md).
25+
2426
## Software measurements
2527

26-
The following list shows the code metrics results that [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] calculates:
28+
The following list shows the code metrics results that Visual Studio calculates:
2729

2830
- **Maintainability Index** - Calculates an index value between 0 and 100 that represents the relative ease of maintaining the code. A high value means better maintainability. Color coded ratings can be used to quickly identify trouble spots in your code. A green rating is between 20 and 100 and indicates that the code has good maintainability. A yellow rating is between 10 and 19 and indicates that the code is moderately maintainable. A red rating is a rating between 0 and 9 and indicates low maintainability.
2931

@@ -45,4 +47,9 @@ For more information about how Code Metrics treats anonymous methods, see [Anony
4547

4648
Some software tools and compilers generate code that is added to a project and that the project developer either does not see or should not change. Mostly, Code Metrics ignores generated code when it calculates the metrics values. This enables the metrics values to reflect what the developer can see and change.
4749

48-
Code generated for Windows Forms is not ignored, because it is code that the developer can see and change.
50+
Code generated for Windows Forms is not ignored, because it is code that the developer can see and change.
51+
52+
## Next steps
53+
54+
- [How to: Generate code metrics data](../code-quality/how-to-generate-code-metrics-data.md)
55+
- [Use the Code Metrics Results window](../code-quality/working-with-code-metrics-data.md)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ manager: ghogen
1616
ms.workload:
1717
- "multiple"
1818
---
19-
# How to: Enforce Maintainable Code with a Code Analysis Check-in Policy
19+
# How to: Enforce maintainable code with a code analysis check-in policy
2020

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).
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 [Code metrics values](../code-quality/code-metrics-values.md).
2222

2323
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.
2424

2525
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.
2626

27-
## To open the Code Analysis Policy Editor
27+
## To open the Code Analysis Policy editor
2828

2929
1.In **Team Explorer**, right-click the team project, click **Team Project Settings**, and then click **Source Control**.
3030

@@ -38,7 +38,7 @@ Administrators of version control for Team Foundation can add the Code Analysis
3838

3939
The **Code Analysis Policy Editor** dialog box appears.
4040

41-
## To enable Code Analysis Maintainability Rules
41+
## To enable code analysis maintainability rules
4242

4343
1.In the **Code Analysis Policy Editor** dialog box, under **Rule Settings**, expand the **Maintainability Rules** node.
4444

@@ -58,5 +58,5 @@ Administrators of version control for Team Foundation can add the Code Analysis
5858

5959
## See also
6060

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)
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/code-quality/how-to-generate-code-metrics-data.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: "How to generate Code Metrics data in Visual Studio | Microsoft Docs"
2+
title: "How to generate code metrics data in Visual Studio | Microsoft Docs"
33
ms.custom: ""
44
ms.date: "12/12/2017"
55
ms.reviewer: ""
66
ms.suite: ""
77
ms.technology: vs-ide-code-analysis
88
ms.tgt_pltfrm: ""
99
ms.topic: "article"
10-
helpviewer_keywords:
10+
helpviewer_keywords:
1111
- "code metrics data"
1212
- "code metrics results"
1313
- "code metrics [Visual Studio]"
1414
author: "gewarren"
1515
ms.author: "gewarren"
1616
manager: ghogen
17-
ms.workload:
17+
ms.workload:
1818
- "multiple"
1919
---
2020
# How to: Generate code metrics data
@@ -33,7 +33,7 @@ You can generate code metrics results for an entire solution or the selected pro
3333

3434
- In the **Code Metrics Results** window, choose the **Calculate Code Metrics for Solution** button.
3535

36-
The results are generated and the **Code Metrics Results** window is displayed.
36+
The results are generated and the **Code Metrics Results** window is displayed.
3737

3838
## To generate code metrics results for one or more selected projects
3939

@@ -45,8 +45,9 @@ You can generate code metrics results for an entire solution or the selected pro
4545

4646
## To view the results details
4747

48-
- In the **Code Metrics Results** window, expand the tree in the **Hierarchy** column.
48+
In the **Code Metrics Results** window, expand the tree in the **Hierarchy** column.
4949

5050
## See also
5151

52-
[Code Metrics values](../code-quality/code-metrics-values.md)
52+
- [Use the Code Metrics Results window](../code-quality/working-with-code-metrics-data.md)
53+
- [Code metrics values](../code-quality/code-metrics-values.md)

docs/code-quality/working-with-code-metrics-data.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
2-
title: "Code Metrics Results in Visual Studio | Microsoft Docs"
2+
title: "The Code Metrics Results window in Visual Studio | Microsoft Docs"
33
ms.custom: ""
44
ms.date: "12/12/2017"
55
ms.reviewer: ""
66
ms.suite: ""
7-
ms.technology:
7+
ms.technology:
88
- "vs-ide-code-analysis"
99
ms.tgt_pltfrm: ""
1010
ms.topic: "article"
11-
f1_keywords:
11+
f1_keywords:
1212
- "vs.codemetrics.output"
13-
helpviewer_keywords:
13+
helpviewer_keywords:
1414
- "code metrics results"
1515
- "code metrics results window"
1616
- "results window, code metrics"
1717
author: "gewarren"
1818
ms.author: "gewarren"
1919
manager: ghogen
20-
ms.workload:
20+
ms.workload:
2121
- "multiple"
2222
---
23-
# Working with code metrics data
23+
# Using the Code Metrics Results window
2424

25-
The **Code Metrics Results** window displays the data that is generated by the code metrics analysis. For more information about code metrics data values, see [Code Metrics Values](../code-quality/code-metrics-values.md).
25+
The **Code Metrics Results** window displays the data that is generated by the code metrics analysis. For more information about code metrics data values, see [Code metrics values](../code-quality/code-metrics-values.md).
2626

2727
## Displaying code metrics results
2828

@@ -36,7 +36,7 @@ The **Code Metrics Results** window is displayed automatically when you generate
3636

3737
- On the **View** menu, choose **Other Windows** > **Code Metrics Results**.
3838

39-
The **Code Metrics Results** window is displayed, even if it contains no results.
39+
The **Code Metrics Results** window is displayed, even if it contains no results.
4040

4141
### To view code metrics details
4242

@@ -127,5 +127,5 @@ For more information about VSTS work items, see [Work items (VSTS)](/vsts/work/w
127127

128128
## See also
129129

130-
[Code Metrics values](../code-quality/code-metrics-values.md)
131-
[How to: Generate Code Metrics Data](../code-quality/how-to-generate-code-metrics-data.md)
130+
- [Code metrics values](../code-quality/code-metrics-values.md)
131+
- [How to: Generate code metrics data](../code-quality/how-to-generate-code-metrics-data.md)

0 commit comments

Comments
 (0)