Skip to content

Commit d61812a

Browse files
Merge pull request #10 from MicrosoftDocs/master
bringing up to date
2 parents 596dda5 + 3b91ab7 commit d61812a

File tree

697 files changed

+1791
-593
lines changed

Some content is hidden

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

697 files changed

+1791
-593
lines changed

.openpublishing.redirection.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41985,9 +41985,24 @@
4198541985
"redirect_url": "/dotnet/fundamentals/code-analysis/code-quality-rule-options",
4198641986
"redirect_document_id": false
4198741987
},
41988+
{
41989+
"source_path": "docs/code-quality/install-fxcop-analyzers.md",
41990+
"redirect_url": "/visualstudio/code-quality/install-net-analyzers",
41991+
"redirect_document_id": false
41992+
},
4198841993
{
4198941994
"source_path": "docs/code-quality/fxcop-analyzers.yml",
41990-
"redirect_url": "/visualstudio/code-quality/migrate-from-legacy-analysis-to-fxcop-analyzers",
41995+
"redirect_url": "/visualstudio/code-quality/migrate-from-legacy-analysis-to-net-analyzers",
41996+
"redirect_document_id": false
41997+
},
41998+
{
41999+
"source_path": "docs/code-quality/fxcop-analyzers-faq.md",
42000+
"redirect_url": "/visualstudio/code-quality/net-analyzers-faq",
42001+
"redirect_document_id": false
42002+
},
42003+
{
42004+
"source_path": "docs/code-quality/migrate-from-legacy-analysis-to-fxcop-analyzers.md",
42005+
"redirect_url": "/visualstudio/code-quality/migrate-from-legacy-analysis-to-net-analyzers",
4199142006
"redirect_document_id": false
4199242007
},
4199342008
{

docs/code-quality/analyzers-faq.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ In addition to rule sets and EditorConfig files, some analyzers are configured t
5757

5858
**Q**: What's the difference between legacy analysis and .NET Compiler Platform-based code analysis?
5959

60-
**A**: .NET Compiler Platform-based code analysis analyzes source code in real time and during compilation, whereas legacy analysis analyzes binary files after build has completed. For more information, see [.NET Compiler Platform-based analysis versus legacy analysis](../code-quality/fxcop-analyzers-faq.md#whats-the-difference-between-legacy-fxcop-and-fxcop-analyzers).
60+
**A**: .NET Compiler Platform-based code analysis analyzes source code in real time and during compilation, whereas legacy analysis analyzes binary files after build has completed. For more information, see [.NET Compiler Platform-based analysis versus legacy analysis](../code-quality/net-analyzers-faq.md#whats-the-difference-between-legacy-fxcop-and-net-analyzers).
61+
62+
## FxCop analyzers versus .NET analyzers
63+
64+
**Q**: What's the difference between FxCop analyzers and .NET analyzers?
65+
66+
**A**: Both FxCop analyzers and .NET analyzers refers to the .NET Compiler Platform ("Roslyn") analyzer implementations of FxCop CA rules. 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). Please consider [migrating from FxCop analyzers to .NET analyzers](migrate-from-fxcop-analyzers-to-net-analyzers.md).
6167

6268
## Treat warnings as errors
6369

@@ -75,12 +81,12 @@ In addition to rule sets and EditorConfig files, some analyzers are configured t
7581
</Project>
7682
```
7783

78-
2. Add a line to your .csproj or .vbproj project file to import the .props file you created in the previous step. This line must be placed before any lines that import the FxCop analyzer .props files. For example, if your .props file is named codeanalysis.props:
84+
2. Add a line to your .csproj or .vbproj project file to import the .props file you created in the previous step. This line must be placed before any lines that import the analyzer .props files. For example, if your .props file is named codeanalysis.props:
7985

8086
```xml
8187
...
8288
<Import Project="..\..\codeanalysis.props" Condition="Exists('..\..\codeanalysis.props')" />
83-
<Import Project="..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.6.5\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.6.5\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props')" />
89+
<Import Project="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.0\build\Microsoft.CodeAnalysis.NetAnalyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.0\build\Microsoft.CodeAnalysis.NetAnalyzers.props')" />
8490
...
8591
```
8692

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

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

docs/code-quality/fxcop-rule-port-status.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: FxCop rule port status
33
ms.date: 05/21/2019
4-
description: Learn about the static code analysis rules that have been ported to FxCop analyzers in Visual Studio. View ported rules and resources on porting updates.
4+
description: Learn about the static code analysis rules that have been ported to .NET analyzers in Visual Studio. View ported rules and resources on porting updates.
55
ms.custom: SEO-VS-2020
66
ms.topic: reference
77
helpviewer_keywords:
88
- fxcop rules
9-
- fxcop analyzers, ported rules
9+
- .NET analyzers, ported rules
1010
author: mikejo5000
1111
ms.author: mikejo
1212
manager: jillfra
@@ -15,13 +15,13 @@ ms.workload:
1515
---
1616
# Fxcop rule port status
1717

18-
If you previously used static code analysis in Visual Studio, you may be wondering which of those rules are available in the current implementation as [FxCop analyzers](install-fxcop-analyzers.md). This page lists the rules that have been ported. See [Unported rules](fxcop-unported-rules.md) for those that haven't been ported and whether there are plans to port them.
18+
If you previously used static code analysis in Visual Studio, you may be wondering which of those rules are available in the current implementation as [.NET analyzers](install-net-analyzers.md). This page lists the rules that have been ported. See [Unported rules](fxcop-unported-rules.md) for those that haven't been ported and whether there are plans to port them.
1919

2020
## Ported rules
2121

22-
The [autogenerated documentation page](https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.md) in the roslyn-analyzers repo has the most up-to-date list of rules that have been ported to FxCop analyzers. That page also has additional information, such as whether the rule is enabled by default and if it has an associated *code fix*. ([Code fixes](../ide/quick-actions.md) are one-click fixes available in the light bulb icon menu in Visual Studio.)
22+
The [autogenerated documentation page](https://github.com/dotnet/roslyn-analyzers/blob/master/src/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.md) in the roslyn-analyzers repo has the most up-to-date list of rules that have been ported to Roslyn analyzers. That page also has additional information, such as whether the rule is enabled by default and if it has an associated *code fix*. ([Code fixes](../ide/quick-actions.md) are one-click fixes available in the light bulb icon menu in Visual Studio.)
2323

24-
As of the date on this page, the list of FxCop rules that have been ported to [FxCop analyzers](install-fxcop-analyzers.md) includes:
24+
As of the date on this page, the list of FxCop rules that have been ported to [.NET analyzers](install-net-analyzers.md) includes:
2525

2626
Rule ID | Title
2727
--------|---------
@@ -58,7 +58,7 @@ Rule ID | Title
5858
[CA1050](/dotnet/fundamentals/code-analysis/quality-rules/ca1050) | Declare types in namespaces
5959
[CA1051](/dotnet/fundamentals/code-analysis/quality-rules/ca1051) | Do not declare visible instance fields
6060
[CA1052](/dotnet/fundamentals/code-analysis/quality-rules/ca1052) | Static holder types should be static or NotInheritable
61-
[CA1053](/dotnet/fundamentals/code-analysis/quality-rules/ca1053) | Static holder types should not have constructors (CA1053 is part of [CA1052](/dotnet/fundamentals/code-analysis/quality-rules/ca1052) for FxCop analyzers)
61+
[CA1053](/dotnet/fundamentals/code-analysis/quality-rules/ca1053) | Static holder types should not have constructors (CA1053 is part of [CA1052](/dotnet/fundamentals/code-analysis/quality-rules/ca1052) for .NET analyzers)
6262
[CA1054](/dotnet/fundamentals/code-analysis/quality-rules/ca1054) | Uri parameters should not be strings
6363
[CA1055](/dotnet/fundamentals/code-analysis/quality-rules/ca1055) | Uri return values should not be strings
6464
[CA1056](/dotnet/fundamentals/code-analysis/quality-rules/ca1056) | Uri properties should not be strings
@@ -198,4 +198,4 @@ CA9999 | Analyzer version mismatch
198198

199199
## See also
200200

201-
- [Microsoft.CodeAnalysis.FxCopAnalyzers rules](https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.md)
201+
- [.NET analyzer rules](https://github.com/dotnet/roslyn-analyzers/blob/master/src/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.md)

docs/code-quality/fxcop-unported-deprecated-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ms.date: 05/21/2019
44
ms.topic: reference
55
helpviewer_keywords:
66
- fxcop rules
7-
- fxcop analyzers, ported rules, unported rules, deprecated rules
7+
- .NET analyzers, ported rules, unported rules, deprecated rules
88
author: mikejo5000
99
ms.author: mikejo
1010
manager: jillfra

docs/code-quality/fxcop-unported-rules-may-get-ported.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ms.date: 05/21/2019
44
ms.topic: reference
55
helpviewer_keywords:
66
- fxcop rules
7-
- fxcop analyzers, ported rules, unported rules, rules that may be ported
7+
- .NET analyzers, ported rules, unported rules, rules that may be ported
88
author: mikejo5000
99
ms.author: mikejo
1010
manager: jillfra

docs/code-quality/fxcop-unported-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ms.date: 05/21/2019
44
ms.topic: reference
55
helpviewer_keywords:
66
- fxcop rules
7-
- fxcop analyzers, ported rules
7+
- .NET analyzers, ported rules
88
author: mikejo5000
99
ms.author: mikejo
1010
manager: jillfra

0 commit comments

Comments
 (0)