Skip to content

Commit f331950

Browse files
authored
Merge pull request MicrosoftDocs#2 from Microsoft/migration
Migration from caps
2 parents a8c23ab + 327fd51 commit f331950

File tree

14,328 files changed

+779407
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

14,328 files changed

+779407
-15
lines changed

.localization-config

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,17 @@
1010
"Locales": [
1111
"cs-cz",
1212
"de-de",
13-
"en-gb",
1413
"es-es",
1514
"fr-fr",
16-
"hu-hu",
1715
"it-it",
1816
"ja-jp",
1917
"ko-kr",
20-
"nl-nl",
2118
"pl-pl",
2219
"pt-br",
23-
"pt-pt",
2420
"ru-ru",
25-
"sv-se",
2621
"tr-tr",
2722
"zh-cn",
28-
"zh-tw",
29-
"zh-hk",
30-
"ar-sa",
31-
"da-dk",
32-
"el-gr",
33-
"fi-fi",
34-
"he-il",
35-
"kk-kz",
36-
"nb-no",
37-
"th-th"
23+
"zh-tw"
3824
],
3925
"Type": "ht"
4026
}

docs/TOC.md

Lines changed: 9433 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: "All Rules rule set"
3+
ms.custom: na
4+
ms.date: "10/14/2016"
5+
ms.prod: "visual-studio-dev14"
6+
ms.reviewer: na
7+
ms.suite: na
8+
ms.technology:
9+
- "vs-devops-test"
10+
ms.tgt_pltfrm: na
11+
ms.topic: "article"
12+
ms.assetid: b490e4d9-2736-4a1f-8bb9-1c35829aa5af
13+
caps.latest.revision: 9
14+
ms.author: "susanno"
15+
manager: "douge"
16+
translation.priority.ht:
17+
- "de-de"
18+
- "es-es"
19+
- "fr-fr"
20+
- "it-it"
21+
- "ja-jp"
22+
- "ko-kr"
23+
- "ru-ru"
24+
- "zh-cn"
25+
- "zh-tw"
26+
translation.priority.mt:
27+
- "cs-cz"
28+
- "pl-pl"
29+
- "pt-br"
30+
- "tr-tr"
31+
---
32+
# All Rules rule set
33+
The All Rules rule set contains all of the rules for both native and managed code. The rule set includes all the rules that are described in the following topics:
34+
35+
1. [Code Analysis for C/C++ Warnings](../codequality/code-analysis-for-c-c---warnings.md)
36+
37+
2. [Code Analysis for Managed Code Warnings](../codequality/code-analysis-for-managed-code-warnings.md)

docs/codequality/analyze-c---code-quality-of-store-apps-using-visual-studio-static-code-analysis.md

Lines changed: 242 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Analyze the code quality of Store apps using Visual Studio static code analysis"
3+
ms.custom: na
4+
ms.date: "10/14/2016"
5+
ms.prod: "visual-studio-dev14"
6+
ms.reviewer: na
7+
ms.suite: na
8+
ms.technology:
9+
- "vs-ide-general"
10+
ms.tgt_pltfrm: na
11+
ms.topic: "article"
12+
ms.assetid: 2341013d-a08b-49a7-b6fd-a7b6aaa797e0
13+
caps.latest.revision: 11
14+
ms.author: "douge"
15+
manager: "douge"
16+
translation.priority.ht:
17+
- "cs-cz"
18+
- "de-de"
19+
- "es-es"
20+
- "fr-fr"
21+
- "it-it"
22+
- "ja-jp"
23+
- "ko-kr"
24+
- "pl-pl"
25+
- "pt-br"
26+
- "ru-ru"
27+
- "tr-tr"
28+
- "zh-cn"
29+
- "zh-tw"
30+
---
31+
# Analyze the code quality of Store apps using Visual Studio static code analysis
32+
![Applies to Windows and Windows Phone](../codequality/media/windows_and_phone_content.png "windows_and_phone_content")
33+
34+
The code analysis tool in Visual Studio examines your code for a set of common defects and violations of good programming practice. Code analysis warnings differ from compiler errors and warnings because the code analysis tool searches for specific code patterns that are valid but could still create issues for you or other people who use your code. Code analysis can also find defects in your code that are difficult to discover through testing. Running the code analysis tool at regular intervals during your development process can enhance the quality of your completed app.
35+
36+
> [!NOTE]
37+
> Code analysis is not available for JavaScript code.
38+
39+
## In this section
40+
41+
|||
42+
|-|-|
43+
|[Analyze Visual Basic and C# code quality](../codequality/analyze-visual-basic-and-csharp-code-quality-in-store-apps-using-visual-studio-static-code-analysis.md)|Use code analysis in Visual Basic and C# projects.|
44+
|[Analyze C++ code quality](../codequality/analyze-c---code-quality-of-store-apps-using-visual-studio-static-code-analysis.md)|Use code analysis in C++ projects.|
45+
46+
## More code analysis info
47+
48+
|||
49+
|-|-|
50+
|[Code analysis in the MSDN Library](http://go.microsoft.com/fwlink/?LinkID=227580)|Find more information about using code analysis in Visual Studio Ultimate, Visual Studio Premium, and Visual Studio Professional.|
51+
|[MSDN code analysis team blog](http://go.microsoft.com/fwlink/?LinkId=227200)|Find more information, including technical papers and samples on the code analysis team blog.|
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: "Analyze Visual Basic and C# code quality in Store apps using Visual Studio static code analysis"
3+
ms.custom: na
4+
ms.date: "10/14/2016"
5+
ms.prod: "visual-studio-dev14"
6+
ms.reviewer: na
7+
ms.suite: na
8+
ms.technology:
9+
- "vs-ide-general"
10+
ms.tgt_pltfrm: na
11+
ms.topic: "article"
12+
f1_keywords:
13+
- "vs.codeanalysis.propertypages.csvb.express"
14+
ms.assetid: cab553fc-19a9-4cbf-858e-8200258ffe50
15+
caps.latest.revision: 14
16+
ms.author: "douge"
17+
manager: "douge"
18+
translation.priority.ht:
19+
- "cs-cz"
20+
- "de-de"
21+
- "es-es"
22+
- "fr-fr"
23+
- "it-it"
24+
- "ja-jp"
25+
- "ko-kr"
26+
- "pl-pl"
27+
- "pt-br"
28+
- "ru-ru"
29+
- "tr-tr"
30+
- "zh-cn"
31+
- "zh-tw"
32+
---
33+
# Analyze Visual Basic and C# code quality in Store apps using Visual Studio static code analysis
34+
![Applies to Windows and Windows Phone](../codequality/media/windows_and_phone_content.png "windows_and_phone_content")
35+
36+
The code analysis tool in Visual Studio Express examines your code for a set of common defects and violations of good programming practice. Code analysis warnings differ from compiler errors and warnings because the code analysis tool searches for specific code patterns that are valid but could still create issues for you or other people who use your code. Code analysis can also find defects in your code that are difficult to discover through testing. Running the code analysis tool at regular intervals during your development process can enhance the quality of your completed app.
37+
38+
> [!NOTE]
39+
> In Visual Studio Ultimate, Visual Studio Premium, and Visual Studio Professional, you can use the full functionality of code analysis. See [Analyzing Application Quality by Using Code Analysis Tools](http://msdn.microsoft.com/library/dd264897.aspx) in the MSDN Library.
40+
41+
## In this topic
42+
You can learn about:
43+
44+
[Running code analysis](../codequality/analyze-visual-basic-and-csharp-code-quality-in-store-apps-using-visual-studio-static-code-analysis.md#BKMK_Run)
45+
46+
[Analyzing and resolving code analysis warnings](../codequality/analyze-visual-basic-and-csharp-code-quality-in-store-apps-using-visual-studio-static-code-analysis.md#BKMK_Analyze)
47+
48+
[Suppressing code analysis warnings](../codequality/analyze-visual-basic-and-csharp-code-quality-in-store-apps-using-visual-studio-static-code-analysis.md#BKMK_Suppress)
49+
50+
[Searching and filtering code analysis results](../codequality/analyze-visual-basic-and-csharp-code-quality-in-store-apps-using-visual-studio-static-code-analysis.md#BKMK_Search)
51+
52+
[Visual Basic and C# code analysis warnings](../codequality/analyze-visual-basic-and-csharp-code-quality-in-store-apps-using-visual-studio-static-code-analysis.md#BKMK_Warnings)
53+
54+
## <a name="BKMK_Run"></a> Running code analysis
55+
To run code analysis on your Visual Studio solution:
56+
57+
- On the **Build** menu, choose **Run Code Analysis on Solution**.
58+
59+
To automatically run code analysis each time you build a project:
60+
61+
1. Right-click the project name in Solution Explorer and then choose **Properties**.
62+
63+
2. In the project property page, choose **Code Analysis** and then choose **Enable Code Analysis on Build (defines CODEANALYSIS constant)**.
64+
65+
The solution is compiled and code analysis runs. Results appear in the Code Analysis window.
66+
67+
![Code Analysis window](../codequality/media/ca_managed_collapsed.png "CA_Managed_Collapsed")
68+
69+
## <a name="BKMK_Analyze"></a> Analyzing and resolving code analysis warnings
70+
To analyze a specific warning, click the title of the warning in the Code Analysis window. The warning expands to display detailed information about the issue.
71+
72+
![Expanded code analysis warning](../codequality/media/ca_managed_callouts.png "CA_Managed_Callouts")
73+
74+
When you expand a warning, the line of code that caused the warning is highlighted in the Visual Studio code editor.
75+
76+
![Code analysis text highlighting](../codequality/media/ca_managed_sourceline.png "CA_Managed_SourceLine")
77+
78+
After you understand the issue, you can resolve it in your code. Then rerun code analysis to make sure that the warning no longer appears in the Code Analysis window, and that your fix has not raised new warnings.
79+
80+
> [!TIP]
81+
> You can rerun code analysis from the Code Analysis window. Click the **Analyze** button and choose the scope of the analysis. You can rerun analysis on the entire solution or on a selected project.
82+
83+
## <a name="BKMK_Suppress"></a> Suppressing code analysis warnings
84+
There are times when you might decide not to fix a code analysis warning. You might decide that resolving the warning requires too much recoding in relation to the probability that the issue will arise in any real-world implementation of your code. Or you might believe that the analysis that is used in the warning is inappropriate for the particular context. You can suppress individual warnings so that they no longer appear in the Code Analysis window.
85+
86+
To suppress a warning:
87+
88+
1. If the detailed information is not displayed, click the title of the warning to expand it.
89+
90+
2. Choose the **Actions** link at the bottom of the warning.
91+
92+
3. Point to **Suppress Message** and then choose either **In Source** or **In Suppression File**.
93+
94+
- **In Source** inserts a `SuppressMessage` attribute in the source file above the method that generated the warning. This makes the suppression more discoverable.
95+
96+
- **In Suppression File** adds a `SuppressMessage` attribute to the **GlobalSuppressions.cs** file of the project. This can make the management of suppressions easier. Note that the `SuppressMessage` attribute added to **GlobalSuppression.cs** also targets the method that generated the warning. It does not suppress the warning globally.
97+
98+
Your decision whether to suppress the warning in the source file or in the suppression file depends on your coding style and needs.
99+
100+
## <a name="BKMK_Search"></a> Searching and filtering code analysis results
101+
You can search long lists of warning messages and you can filter warnings in multi-project solutions.
102+
103+
![Search and filter the code analysis window](../codequality/media/ca_searchfilter.png "CA_SearchFilter")
104+
105+
In [!INCLUDE[vs_dev11_expwin_long](../codequality/includes/vs_dev11_expwin_long_md.md)], all code analysis warnings have the severity level of Warning.
106+
107+
## <a name="BKMK_Warnings"></a> Visual Basic and C# code analysis warnings
108+
Code analysis raises the following warnings:
109+
110+
[CA1001: Types that own disposable fields should be disposable](http://msdn.microsoft.com/library/ms182172.aspx)
111+
112+
[CA1821: Remove empty finalizers](http://msdn.microsoft.com/library/bb264476.aspx)
113+
114+
[CA2213: Disposable fields should be disposed](http://msdn.microsoft.com/library/ms182328.aspx)
115+
116+
[CA2229: Implement serialization constructors](http://msdn.microsoft.com/library/ms182343.aspx)
117+
118+
[CA2231: Overload operator equals on overriding ValueType.Equals](http://msdn.microsoft.com/library/ms182359.aspx)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: "Analyzing Application Quality by Using Code Analysis Tools"
3+
ms.custom: na
4+
ms.date: "10/14/2016"
5+
ms.prod: "visual-studio-dev14"
6+
ms.reviewer: na
7+
ms.suite: na
8+
ms.technology:
9+
- "vs-devops-test"
10+
ms.tgt_pltfrm: na
11+
ms.topic: "article"
12+
f1_keywords:
13+
- "vs.codeanalysis.analysisresults"
14+
helpviewer_keywords:
15+
- "application quality, analyzing"
16+
- "code analysis"
17+
- "team-based development, analyzing application quality"
18+
ms.assetid: 21680516-ddb5-446d-90d4-19d94f6ec699
19+
caps.latest.revision: 24
20+
ms.author: "douge"
21+
manager: "douge"
22+
translation.priority.ht:
23+
- "cs-cz"
24+
- "de-de"
25+
- "es-es"
26+
- "fr-fr"
27+
- "it-it"
28+
- "ja-jp"
29+
- "ko-kr"
30+
- "pl-pl"
31+
- "pt-br"
32+
- "ru-ru"
33+
- "tr-tr"
34+
- "zh-cn"
35+
- "zh-tw"
36+
---
37+
# Analyzing Application Quality by Using Code Analysis Tools
38+
## In This Section
39+
[Analyzing Managed Code Quality](../codequality/analyzing-managed-code-quality-by-using-code-analysis.md)
40+
Visual Studio code analysis for managed code provides information about managed assemblies, such as violations of the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines. Warning messages identify any relevant programming and design issues and, when it is possible, supply information about how to fix the problem.
41+
42+
[Analyzing C/C++ Code Quality by Using Code Analysis](../codequality/analyzing-c-c---code-quality-by-using-code-analysis.md)
43+
The C/C++ Code Analysis tool provides information to developers about possible defects in their C/C++ source code. Common coding errors reported by the tool include buffer overruns, un-initialized memory, null pointer dereferences, and memory and resource leaks.
44+
45+
[Using Rule Sets to Group Code Analysis Rules](../codequality/using-rule-sets-to-group-code-analysis-rules.md)
46+
Select and create *rule sets* to apply to your project.
47+
48+
[Code Analysis Application Errors](../codequality/code-analysis-application-errors.md)
49+
Fix errors in the code analysis functionality.
50+
51+
[Enhancing Code Quality with Team Project Check-in Policies](../codequality/enhancing-code-quality-with-team-project-check-in-policies.md)
52+
When you use Team Foundation Version Control (TFVC), you can create check-in policies for your team projects that enforce practices that lead to better code and more efficient group development. Check-in policies are rules that are set at the team project level and enforced on developer computers before code is allowed to be checked in.
53+
54+
### Code Analysis for Drivers
55+
Code analysis tools can help improve the stability and reliability of your driver by systematically analyzing the driver source code.
56+
57+
[Analyzing Driver Quality by Using Code Analysis Tools](http://go.microsoft.com/fwlink/?LinkId=227618)
58+
Code Analysis for Drivers is a compile-time static verification tool that detects basic coding errors in C and C++ programs and includes a specialized module that is designed to detect errors in (primarily) kernel-mode driver code.. Static Driver Verifier (SDV) is a static verification tool that systematically analyzes the source code of Windows kernel-mode drivers. SDV determines whether the driver correctly interacts with the Windows operating system kernel.
59+
60+
[Code Analysis for Drivers Warnings](http://go.microsoft.com/fwlink/?LinkId=225920)
61+
Describes the warnings that the Code Analysis for Drivers reports when it detects a possible error in driver code.
62+
63+
## Related Tasks
64+
[Measuring Complexity and Maintainability of Managed Code](../codequality/measuring-complexity-and-maintainability-of-managed-code.md)
65+
Insert description here.
66+
67+
[Unit Test Your Code](../codequality/unit-test-your-code.md)
68+
Insert description here.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "Analyzing C-C++ Code Quality by Using Code Analysis"
3+
ms.custom: na
4+
ms.date: "10/14/2016"
5+
ms.prod: "visual-studio-dev14"
6+
ms.reviewer: na
7+
ms.suite: na
8+
ms.technology:
9+
- "vs-devops-test"
10+
ms.tgt_pltfrm: na
11+
ms.topic: "article"
12+
helpviewer_keywords:
13+
- "C/C++, code analysis"
14+
- "code analysis, running"
15+
- "code analysis, C/C++"
16+
- "code analysis,native"
17+
- "native code analysis"
18+
- "C++, code analysis"
19+
- "C, code analysis"
20+
ms.assetid: 03b8b47a-e9d8-4692-835f-2d22ec6c76a4
21+
caps.latest.revision: 35
22+
ms.author: "douge"
23+
manager: "douge"
24+
translation.priority.ht:
25+
- "de-de"
26+
- "es-es"
27+
- "fr-fr"
28+
- "it-it"
29+
- "ja-jp"
30+
- "ko-kr"
31+
- "ru-ru"
32+
- "zh-cn"
33+
- "zh-tw"
34+
translation.priority.mt:
35+
- "cs-cz"
36+
- "pl-pl"
37+
- "pt-br"
38+
- "tr-tr"
39+
---
40+
# Analyzing C/C++ Code Quality by Using Code Analysis
41+
You can improve your C/C++ code by using the code analysis in Visual Studio to find and fix code defects.
42+
43+
## In This Section
44+
45+
|||
46+
|-|-|
47+
|[Code Analysis for C/C++ Overview](../codequality/code-analysis-for-c-c---overview.md)|Learn about the features of the code analysis tool.|
48+
|[Quick Start: Code Analysis for C/C++](../codequality/quick-start--code-analysis-for-c-c--.md)|Learn the basics of code analysis for C/C++.|
49+
|[Using Rule Sets to Specify the C++ Rules to Run](../codequality/using-rule-sets-to-specify-the-c---rules-to-run.md)|Specify the rules to run on your project or solution.|
50+
|[Using the C++ Core Guidelines checkers](../codequality/using-the-c---core-guidelines-checkers.md)|Add the C++ Core Guidelines checkers to your project.|
51+
|[How to: Set Code Analysis Properties for C/C++ Projects](../codequality/how-to--set-code-analysis-properties-for-c-c---projects.md)|Describes the configuration settings for code analysis.|
52+
|[How to: Specify Additional Code Information by Using __analysis_assume](../codequality/how-to--specify-additional-code-information-by-using-__analysis_assume.md)|Learn how to use `__analysis_assume` to improve code analysis.|
53+
|[Walkthrough: Analyzing C/C++ Code for Defects](../codequality/walkthrough--analyzing-c-c---code-for-defects.md)|Gain hands-on experience by performing code analysis on a C/C++ project.|
54+
|[Using SAL Annotations to Reduce C/C++ Code Defects](../codequality/using-sal-annotations-to-reduce-c-c---code-defects.md)|Learn about annotation features of the code analysis tool to detect violations of the contract between the caller and the callee.|
55+
|[Code Analysis for C/C++ Warnings](../codequality/code-analysis-for-c-c---warnings.md)|Lists and describes code analysis warnings.|
56+
57+
## See Also
58+
[Analyzing Application Quality](../codequality/analyzing-application-quality-by-using-code-analysis-tools.md)
59+
[Analyzing Managed Code Quality](../codequality/analyzing-managed-code-quality-by-using-code-analysis.md)

0 commit comments

Comments
 (0)