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/disable-code-analysis.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Visual Studio allows you to control whether source code analyzers run at build t
24
24
25
25
- Source analysis versus legacy analysis
26
26
27
-
This article applies to source code analysis and not to legacy (binary) analysis. For information about disabling legacy analysis, see [Enable and disable binary code analysis for managed code](how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).
27
+
This article applies to source code analysis and not to legacy (binary) analysis. For information about disabling legacy analysis, see [Enable and disable binary code analysis for managed code](/previous-versions/visualstudio/visual-studio-2019/code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code).
28
28
29
29
## .NET Core, .NET Standard, and .NET 5+ projects
30
30
@@ -75,7 +75,7 @@ This page lets you disable code analysis in Visual Studio. There are limitations
75
75
76
76
- Source analysis versus legacy analysis
77
77
78
-
This article applies to source code analysis and not to legacy (binary) analysis. For information about disabling legacy analysis, see [Enable and disable binary code analysis for managed code](how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).
78
+
This article applies to source code analysis and not to legacy (binary) analysis. For information about disabling legacy analysis, see [Enable and disable binary code analysis for managed code](/previous-versions/visualstudio/visual-studio-2019/code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code).
-[Enable and disable binary code analysis for managed code](how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md)
117
+
-[Enable and disable binary code analysis for managed code](/previous-versions/visualstudio/visual-studio-2019/code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code)
Copy file name to clipboardExpand all lines: docs/code-quality/how-to-run-code-analysis-manually-for-managed-code.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,4 +37,4 @@ To manually run a code analysis, follow these steps:
37
37
## Related content
38
38
39
39
-[Disable source code analysis for .NET](disable-code-analysis.md)
40
-
-[Enable and disable binary code analysis for managed code](how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md)
40
+
-[Enable and disable binary code analysis for managed code](/previous-versions/visualstudio/visual-studio-2019/code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code)
Copy file name to clipboardExpand all lines: docs/code-quality/in-source-suppression-overview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,9 +226,9 @@ For maintainability reasons, omitting the rule name isn't recommended.
226
226
227
227
Suppression attributes can be applied to a method, but can't be embedded within a method body. All violations of a particular rule are suppressed if you add the <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute to the method.
228
228
229
-
In some cases, you might want to suppress a particular instance of the violation. Consider the example where future code isn't automatically exempt from the code analysis rule. Certain code analysis rules allow you to suppress a particular instance of the violation by using the `MessageId` property of the `SuppressMessageAttribute` attribute. In general, legacy rules for violations on a particular symbol (a local variable or parameter) respect the `MessageId` property. [CA1500:VariableNamesShouldNotMatchFieldNames](../code-quality/ca1500.md) is an example of such a rule. However, legacy rules for violations on executable code (non-symbol) don't respect the `MessageId` property. Also, .NET Compiler Platform ("Roslyn") analyzers don't respect the `MessageId` property.
229
+
In some cases, you might want to suppress a particular instance of the violation. Consider the example where future code isn't automatically exempt from the code analysis rule. Certain code analysis rules allow you to suppress a particular instance of the violation by using the `MessageId` property of the `SuppressMessageAttribute` attribute. In general, legacy rules for violations on a particular symbol (a local variable or parameter) respect the `MessageId` property. [CA1500:VariableNamesShouldNotMatchFieldNames](/previous-versions/visualstudio/visual-studio-2019/code-quality/ca1500) is an example of such a rule. However, legacy rules for violations on executable code (non-symbol) don't respect the `MessageId` property. Also, .NET Compiler Platform ("Roslyn") analyzers don't respect the `MessageId` property.
230
230
231
-
To suppress a particular symbol violation of a rule, specify the symbol name for the `MessageId` property of the `SuppressMessageAttribute` attribute. The following example shows code with two violations of [CA1500:VariableNamesShouldNotMatchFieldNames](../code-quality/ca1500.md): one violation for the `name` variable and another violation for the `age` variable. Only the violation for the `age` symbol is suppressed.
231
+
To suppress a particular symbol violation of a rule, specify the symbol name for the `MessageId` property of the `SuppressMessageAttribute` attribute. The following example shows code with two violations of [CA1500:VariableNamesShouldNotMatchFieldNames](/previous-versions/visualstudio/visual-studio-2019/code-quality/ca1500): one violation for the `name` variable and another violation for the `age` variable. Only the violation for the `age` symbol is suppressed.
232
232
233
233
### [C#](#tab/csharp)
234
234
@@ -305,7 +305,7 @@ Managed code compilers and some external tools generate code to help rapid code
305
305
306
306
For source code analysis, you can suppress messages in generated code in an *.editorconfig* file. For more information, see [Exclude generated code](/dotnet/fundamentals/code-analysis/configuration-options#exclude-generated-code).
307
307
308
-
For legacy code analysis, you can choose whether to suppress code analysis warnings and errors for generated code. For information about how to suppress such warnings and errors, see [Suppress code analysis warnings for generated code](../code-quality/how-to-suppress-code-analysis-warnings-for-generated-code.md).
308
+
For legacy code analysis, you can choose whether to suppress code analysis warnings and errors for generated code. For information about how to suppress such warnings and errors, see [Suppress code analysis warnings for generated code](/previous-versions/visualstudio/visual-studio-2019/code-quality/how-to-suppress-code-analysis-warnings-for-generated-code).
309
309
310
310
> [!NOTE]
311
311
> Code analysis ignores `GeneratedCodeAttribute` when it is applied to either an entire assembly or a single parameter.
Copy file name to clipboardExpand all lines: docs/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.subservice: code-analysis
17
17
18
18
# Migrate from NuGet FxCop analyzers to .NET analyzers
19
19
20
-
Source analysis by .NET Compiler Platform ("Roslyn") analyzers replaces [legacy analysis](code-analysis-for-managed-code-overview.md) for managed code. Many of the legacy analysis (FxCop) rules have already been rewritten as source analyzers.
20
+
Source analysis by .NET Compiler Platform ("Roslyn") analyzers replaces [legacy analysis](/previous-versions/visualstudio/visual-studio-2019/code-quality/code-analysis-for-managed-code-overview) for managed code. Many of the legacy analysis (FxCop) rules have already been rewritten as source analyzers.
21
21
22
22
Prior to Visual Studio 2019 16.8 and .NET 5.0, these analyzers shipped as `Microsoft.CodeAnalysis.FxCopAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers).
Copy file name to clipboardExpand all lines: docs/code-quality/migrate-from-legacy-analysis-to-net-analyzers.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.subservice: code-analysis
17
17
18
18
# Migrate from legacy analysis (FxCop) to source analysis (.NET analyzers)
19
19
20
-
Source analysis by .NET Compiler Platform ("Roslyn") analyzers replaces [legacy analysis](../code-quality/code-analysis-for-managed-code-overview.md) for managed code. For newer project templates such as .NET Core and .NET Standard projects, legacy analysis is not available.
20
+
Source analysis by .NET Compiler Platform ("Roslyn") analyzers replaces [legacy analysis](/previous-versions/visualstudio/visual-studio-2019/code-quality/code-analysis-for-managed-code-overview) for managed code. For newer project templates such as .NET Core and .NET Standard projects, legacy analysis is not available.
21
21
22
22
Many of the legacy analysis (FxCop) rules have already been rewritten for .NET analyzers, a set of Roslyn code analyzers. Roslyn analyzers run source-code based analysis during compiler execution. Analyzer results are reported along with compiler results.
23
23
@@ -31,7 +31,7 @@ For more information on the differences between legacy analysis and source analy
31
31
32
32
To migrate to source analysis:
33
33
34
-
1.[Enable or install the .NET analyzers](install-net-analyzers.md). Like legacy analysis rule violations, source code analysis violations appear in the Error List window in Visual Studio. In addition, source code analysis violations also show up in the code editor as *squiggles* under the offending code. The color of the squiggle depends on the [severity setting](../code-quality/use-roslyn-analyzers.md#configure-severity-levels) of the rule. To see the status of rules ported to the new .NET analyzers, see [Ported and unported rules](../code-quality/fxcop-rule-port-status.md).
34
+
1.[Enable or install the .NET analyzers](install-net-analyzers.md). Like legacy analysis rule violations, source code analysis violations appear in the Error List window in Visual Studio. In addition, source code analysis violations also show up in the code editor as *squiggles* under the offending code. The color of the squiggle depends on the [severity setting](../code-quality/use-roslyn-analyzers.md#configure-severity-levels) of the rule. To see the status of rules ported to the new .NET analyzers, see [Ported and unported rules](/previous-versions/visualstudio/visual-studio-2019/code-quality/fxcop-rule-port-status).
35
35
36
36
> [!NOTE]
37
37
> Prior to Visual Studio 2019 16.8 and .NET 5.0, these analyzers shipped as `Microsoft.CodeAnalysis.FxCopAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers). Starting in Visual Studio 2019 16.8 and .NET 5.0, these analyzers are [included with the .NET SDK](/dotnet/fundamentals/code-analysis/overview). They are also available as `Microsoft.CodeAnalysis.NetAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers). For more information, see [Migrate from FxCop analyzers to .NET analyzers](migrate-from-fxcop-analyzers-to-net-analyzers.md).
Copy file name to clipboardExpand all lines: docs/code-quality/static-code-analysis-for-managed-code-overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The analysis tool represents the checks it performs during an analysis as warnin
27
27
28
28
You can run code analysis on your project manually or automatically.
29
29
30
-
To run code analysis each time that you build a project, select the option on the project's **Code Analysis** property page. For more information, see [How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).
30
+
To run code analysis each time that you build a project, select the option on the project's **Code Analysis** property page. For more information, see [How to: Enable and Disable Automatic Code Analysis](/previous-versions/visualstudio/visual-studio-2019/code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code).
31
31
32
32
To run code analysis manually on a project, from the menu bar choose **Analyze** > **Run Code Analysis** > **Run Code Analysis on \<project>**.
33
33
@@ -72,4 +72,4 @@ You can use the integrated features of the build system to run the analysis tool
72
72
73
73
-[Overview of .NET Compiler Platform-based analyzers](../code-quality/roslyn-analyzers-overview.md)
74
74
-[Using Rule Sets to Group Code Analysis Rules](/previous-versions/visualstudio/visual-studio-2019/code-quality/using-rule-sets-to-group-code-analysis-rules)
75
-
-[How to: Enable and Disable Automatic Code Analysis](../code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md)
75
+
-[How to: Enable and Disable Automatic Code Analysis](/previous-versions/visualstudio/visual-studio-2019/code-quality/how-to-enable-and-disable-automatic-code-analysis-for-managed-code)
0 commit comments