Skip to content

Commit 2463688

Browse files
authored
Merge pull request #5771 from MicrosoftDocs/master637339744543723546
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 6940caf + 2d6ef24 commit 2463688

8 files changed

+33
-33
lines changed

docs/code-quality/how-to-create-a-custom-rule-set.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
title: Create a custom code analysis rule set
33
ms.date: 11/02/2018
44
ms.topic: how-to
5-
f1_keywords:
5+
f1_keywords:
66
- vs.codeanalysis.addremoverulesets
7-
helpviewer_keywords:
7+
helpviewer_keywords:
88
- rule sets
99
author: mikejo5000
1010
ms.author: mikejo
1111
manager: jillfra
12-
ms.workload:
12+
ms.workload:
1313
- multiple
1414
---
1515
# Customize a rule set
@@ -20,9 +20,9 @@ You can create a custom rule set to meet specific project needs for code analysi
2020

2121
To create a custom rule set, you can open a built-in rule set in the **rule set editor**. From there, you can add or remove specific rules, and you can change the action that occurs when a rule is violated—for example, show a warning or an error.
2222

23-
1. In **Solution Explorer**, select and hold (or right-click) the project and then select **Properties**.
23+
1. In **Solution Explorer**, right-click the project and then select **Properties**.
2424

25-
2. On the **Properties** pages, go to the **Code Analysis** tab.
25+
2. On the **Properties** pages, select the **Code Analysis** tab.
2626

2727
::: moniker range="vs-2017"
2828

@@ -51,7 +51,7 @@ To create a custom rule set, you can open a built-in rule set in the **rule set
5151

5252
You can create a new rule set file from the **New File** dialog:
5353

54-
1. Select **File** > **New** > **File**, or select **Ctrl**+**N**.
54+
1. Select **File** > **New** > **File**, or press **Ctrl**+**N**.
5555

5656
2. In the **New File** dialog box, select the **General** category on the left, and then select **Code Analysis Rule Set**.
5757

@@ -64,9 +64,9 @@ You can create a new rule set file from the **New File** dialog:
6464
> [!NOTE]
6565
> The following procedure does not apply to .NET Core projects, which don't have a **Code Analysis** property tab.
6666
67-
1. In **Solution Explorer**, select and hold (or right-click) the project and then select **Properties**.
67+
1. In **Solution Explorer**, right-click the project and then select **Properties**.
6868

69-
2. On the **Properties** pages, go to the **Code Analysis** tab.
69+
2. On the **Properties** pages, select the **Code Analysis** tab.
7070

7171
::: moniker range="vs-2017"
7272

docs/code-quality/how-to-generate-code-metrics-data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
title: Generate code metrics from the IDE or command line
33
ms.date: 11/02/2018
44
ms.topic: how-to
5-
helpviewer_keywords:
5+
helpviewer_keywords:
66
- code metrics data
77
- code metrics results
88
- code metrics [Visual Studio]
99
author: mikejo5000
1010
ms.author: mikejo
1111
manager: jillfra
12-
ms.workload:
12+
ms.workload:
1313
- multiple
1414
---
1515
# How to: Generate code metrics data
@@ -66,23 +66,23 @@ You can configure the thresholds at which the code metrics rules fire.
6666

6767
## Calculate Code Metrics menu command
6868

69-
Generate code metrics for one or all of your open projects in the IDE by going to the **Analyze** > **Calculate Code Metrics** menu.
69+
Generate code metrics for one or all of your open projects in the IDE by using the **Analyze** > **Calculate Code Metrics** menu.
7070

7171
### Generate code metrics results for an entire solution
7272

7373
You can generate code metrics results for an entire solution in any of the following ways:
7474

7575
- From the menu bar, select **Analyze** > **Calculate Code Metrics** > **For Solution**.
7676

77-
- In **Solution Explorer**, select and hold (or right-click) the solution and then select **Calculate Code Metrics**.
77+
- In **Solution Explorer**, right-click the solution and then select **Calculate Code Metrics**.
7878

7979
- In the **Code Metrics Results** window, select the **Calculate Code Metrics for Solution** button.
8080

8181
The results are generated and the **Code Metrics Results** window is displayed. To view the results details, expand the tree in the **Hierarchy** column.
8282

8383
### Generate code metrics results for one or more projects
8484

85-
1. In **Solution Explorer**, choose one or more projects.
85+
1. In **Solution Explorer**, select one or more projects.
8686

8787
1. From the menu bar, select **Analyze** > **Calculate Code Metrics** > **For Selected Project(s)**.
8888

docs/code-quality/how-to-run-code-analysis-manually-for-managed-code.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
title: How to run code analysis manually for managed code
33
ms.date: 11/04/2019
44
ms.topic: how-to
5-
helpviewer_keywords:
5+
helpviewer_keywords:
66
- code analysis, running
77
- run code analysis
88
ms.assetid: 5086d228-f92e-4515-9708-c5b89b9e9a03
99
author: mavasani
1010
ms.author: mikejo
1111
manager: jillfra
12-
ms.workload:
12+
ms.workload:
1313
- dotnet
1414
---
1515
# How to: Run code analysis manually for managed code (requires Visual Studio 2019 version 16.5 or later)
1616
By default, .NET Compiler Platform ("Roslyn") code analyzers analyze your C# or Visual Basic code as you type by doing live analysis, as well as during build. Hence, you would normally not require to manually trigger code analysis. However, there are some scenarios where you may want to manually trigger code analysis:
1717

1818
- By default, live code analysis executes analyzers only for open files in Visual Studio. However, you may be interested in viewing code analysis warnings for all files in a specific project or solution. If so, you would want to trigger code analysis once on a project or a solution. Alternatively, you can enable continuous live code analysis to execute on entire solution. For more information, see [How to: Configure live code analysis scope for managed code](./configure-live-code-analysis-scope-managed-code.md).
19-
- You may prefer on-demand code analysis execution workflow over continuous live analysis or build-time analysis. If so, you can disable analyzer execution during live analysis and/or build. For information about disabling analysis, see [How to disable source code analysis](disable-code-analysis.md). Then you would want to manually trigger code analysis once on a project or a solution.
19+
- You may prefer on-demand code analysis execution workflow over continuous live analysis or build-time analysis. If so, you can disable analyzer execution during live analysis and/or build. For information about disabling analysis, see [How to disable source code analysis](disable-code-analysis.md). Then you would want to manually trigger code analysis once on a project or a solution.
2020

2121
### Run code analysis manually
2222

23-
1. In **Solution Explorer**, choose the project.
23+
1. In **Solution Explorer**, select the project.
2424

2525
2. On the **Analyze** menu, select **Run Code Analysis on** *Project Name*.
2626

docs/code-quality/in-source-suppression-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In C++/CLI, use the macros CA\_SUPPRESS\_MESSAGE or CA\_GLOBAL\_SUPPRESS_MESSAGE
4444

4545
## SuppressMessage attribute
4646

47-
When you select **Suppress** from the context or right-click (or select and hold) menu of a code analysis warning in the **Error List**, a <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute is added either in your code or to the project's global suppression file.
47+
When you select **Suppress** from the context or right-click menu of a code analysis warning in the **Error List**, a <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute is added either in your code or to the project's global suppression file.
4848

4949
The <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute has the following format:
5050

docs/code-quality/install-fxcop-analyzers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
title: Install FxCop analyzers
33
ms.date: 08/03/2018
44
ms.topic: how-to
5-
helpviewer_keywords:
5+
helpviewer_keywords:
66
- fxcop analyzers
77
author: mikejo5000
88
ms.author: mikejo
99
manager: jillfra
10-
ms.workload:
10+
ms.workload:
1111
- dotnet
1212
---
1313
# Install FxCop analyzers in Visual Studio
@@ -22,7 +22,7 @@ You can install these FxCop analyzers either as a NuGet package or as a VSIX ext
2222

2323
In Visual Studio 2019 version 16.3 and later, you can install the [Microsoft.CodeAnalysis.FxCopAnalyzers](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers) NuGet package directly from the project's Code Analysis properties page:
2424

25-
1. Right-click (or select and hold) on the project node in **Solution Explorer**, select **Properties**, and then go to the **Code Analysis** tab.
25+
1. Right-click on the project node in **Solution Explorer**, select **Properties**, and then select the **Code Analysis** tab.
2626

2727
![Install FxCop analyzers package from properties page in Visual Studio](media/install-fxcop-properties-page.png)
2828

@@ -66,7 +66,7 @@ Use the following guidelines to determine which version of the FxCop analyzers p
6666

6767
| Visual Studio version | FxCop analyzer package version |
6868
| - | - |
69-
| Visual Studio 2019 (all versions) | [latest](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/) |
69+
| Visual Studio 2019 (all versions) | [latest](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/) |
7070
| Visual Studio 2017 version 15.9 | [2.9.10](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/2.9.10) |
7171
| Visual Studio 2017 version 15.5 to 15.8 | [2.6.4](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/2.6.4) |
7272
| Visual Studio 2017 version 15.3 to 15.4 | [2.3.0-beta1](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/2.3.0-beta1) |

docs/code-quality/use-roslyn-analyzers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ You can do much of the customization of analyzer diagnostics from **Solution Exp
2222

2323
![Analyzers node in Solution Explorer](media/analyzers-expanded-in-solution-explorer.png)
2424

25-
You can view the properties of a diagnostic, including its description and default severity, in the **Properties** window. To view the properties, right-click (or select and hold) on the rule and select **Properties**, or select the rule and then select **Alt**+**Enter**.
25+
You can view the properties of a diagnostic, including its description and default severity, in the **Properties** window. To view the properties, right-click the rule and select **Properties**, or select the rule and then press **Alt**+**Enter**.
2626

2727
![Diagnostic properties in Properties window](media/analyzer-diagnostic-properties.png)
2828

29-
To see online documentation for a diagnostic, right-click (or select and hold) on the diagnostic and select **View Help**.
29+
To see online documentation for a diagnostic, right-click the diagnostic and select **View Help**.
3030

3131
The icons next to each diagnostic in **Solution Explorer** correspond to the icons you see in the rule set when you open it in the editor:
3232

@@ -219,7 +219,7 @@ Visual Studio provides a convenient way to configure a rule's severity from the
219219

220220
Visual Studio also provides a convenient way to configure a rule's severity from the error list context menu.
221221

222-
1. After a violation occurs, right-click (or select and hold) the diagnostic entry in the error list.
222+
1. After a violation occurs, right-click the diagnostic entry in the error list.
223223

224224
2. From the context menu, select **Set severity**.
225225

@@ -236,12 +236,12 @@ Visual Studio also provides a convenient way to configure a rule's severity from
236236

237237
### Set rule severity from Solution Explorer
238238

239-
1. In Solution Explorer, select **References** > **Analyzers** (or **Dependencies** > **Analyzers** for .NET Core projects).
239+
1. In Solution Explorer, expand **References** > **Analyzers** (or **Dependencies** > **Analyzers** for .NET Core projects).
240240

241241
2. Expand the assembly that contains the rule you want to set severity for.
242242

243243
::: moniker range=">=vs-2019"
244-
3. Right-click (or select and hold) the rule and select **Set severity**. In the context menu, choose one of the severity options.
244+
3. Right-click the rule and select **Set severity**. In the context menu, choose one of the severity options.
245245

246246
Visual Studio adds an entry to the EditorConfig file to configure the rule to the requested level. If your project uses a ruleset file instead of an EditorConfig file, the severity entry is added to the ruleset file.
247247

@@ -250,7 +250,7 @@ Visual Studio also provides a convenient way to configure a rule's severity from
250250
::: moniker-end
251251

252252
::: moniker range="vs-2017"
253-
3. Right-click (or select and hold) the rule and select **Set Rule Set Severity**. In the context menu, choose one of the severity options.
253+
3. Right-click the rule and select **Set Rule Set Severity**. In the context menu, choose one of the severity options.
254254

255255
The severity for the rule is saved in the active rule set file.
256256
::: moniker-end
@@ -261,7 +261,7 @@ Visual Studio also provides a convenient way to configure a rule's severity from
261261

262262
1. Open the the active rule set file in one of the following ways:
263263

264-
- In **Solution Explorer**, double click the file, right-click (or select and hold) **References** > **Analyzers** node, and select **Open Active Rule Set**.
264+
- In **Solution Explorer**, double click the file, right-click **References** > **Analyzers** node, and select **Open Active Rule Set**.
265265
- On the **Code Analysis** property page for the project, select **Open** .
266266

267267
If this is the first time you're editing the rule set, Visual Studio makes a copy of the default rule set file, names it *\<projectname>.ruleset*, and adds it to your project. This custom rule set also becomes the active rule set for your project.
@@ -330,13 +330,13 @@ There are multiple ways to suppress rule violations:
330330

331331
- From the **code editor**
332332

333-
Place the cursor in the line of code with the violation and select **Ctrl**+**Period (.)** to open the **Quick Actions** menu. Select **Suppress CAXXXX** > **in Source/in Suppression File**.
333+
Place the cursor in the line of code with the violation and press **Ctrl**+**Period (.)** to open the **Quick Actions** menu. Select **Suppress CAXXXX** > **in Source/in Suppression File**.
334334

335335
![Suppress diagnostic from quick actions menu](media/suppress-diagnostic-from-editor.png)
336336

337337
- From the **Error List**
338338

339-
Choose the rules you want to suppress, and then right-click (or select and hold) and select **Suppress** > **In Source/In Suppression File**.
339+
Select the rules you want to suppress, and then right-click and select **Suppress** > **In Source/In Suppression File**.
340340

341341
- If you suppress **In Source**, the **Preview Changes** dialog opens and shows a preview of the C# [#pragma warning](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-pragma-warning) or Visual Basic [#Disable warning](/dotnet/visual-basic/language-reference/directives/directives) directive that's added to the source code.
342342

docs/code-quality/working-in-the-code-analysis-rule-set-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The editor displays the rules in a tree structure that groups the rules by a rul
3232
> [!TIP]
3333
> You can change how rules are grouped in the **Group by** drop-down.
3434
35-
- In the **Action** field of a group, specify the action to apply to all rules in the group.
35+
- Click the **Action** field of a group, specify the action to apply to all rules in the group.
3636

3737
- Select or clear the check box for an individual rule. When you select the check box for a rule, the rule is set to the **Warning** action.
3838

docs/xml-tools/how-to-create-an-xml-document-based-on-an-xsd-schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Also, note that `xs:base64Binary` content will be generated only if enumerations
3737

3838
1. Follow the steps in [How to: Create and edit an XSD schema file](../xml-tools/how-to-create-and-edit-an-xsd-schema-file.md).
3939

40-
2. In the [XML Schema Explorer](../xml-tools/xml-schema-explorer.md), select and hold (or right-click) the `PurchaseOrder` global element, and then select **Generate Sample XML**.
40+
2. In the [XML Schema Explorer](../xml-tools/xml-schema-explorer.md), right-click the `PurchaseOrder` global element, and then select **Generate Sample XML**.
4141

4242
When you select this option, the PurchaseOrder.*xml* file with the following sample XML content will be generated and opened in the XML editor:
4343

0 commit comments

Comments
 (0)