Skip to content

Commit

Permalink
Merge pull request #6335 from Youssef1313/replace-all
Browse files Browse the repository at this point in the history
Replace docs.microsoft.com with learn.microsoft.com
  • Loading branch information
mavasani authored Dec 13, 2022
2 parents f016189 + b8f3130 commit fde4933
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ assignees: ''

### Analyzer

**Diagnostic ID**: [CA2013](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2013): `Do not use ReferenceEquals with value types`
**Diagnostic ID**: [CA2013](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2013): `Do not use ReferenceEquals with value types`

### Analyzer source

**SDK**: [Built-in CA analyzers in .NET 5 SDK or later](https://docs.microsoft.com/dotnet/fundamentals/productivity/code-analysis)
**SDK**: [Built-in CA analyzers in .NET 5 SDK or later](https://learn.microsoft.com/dotnet/fundamentals/productivity/code-analysis)

**Version**: [SDK 5.0.100](https://dotnet.microsoft.com/download/dotnet/5.0)

Expand All @@ -30,7 +30,7 @@ _OR_

<!--
NOTE: `Microsoft.CodeAnalysis.FxCopAnalyzers` package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK.
Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.
Please refer to https://learn.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.
-->

### Describe the bug
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/rule-improvement.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''

### Analyzer

**Diagnostic ID**: [CA1716](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716)
**Diagnostic ID**: [CA1716](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716)

### Describe the improvement

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
Make sure you have read the contribution guidelines:
- https://docs.microsoft.com/contribute/dotnet/dotnet-contribute-code-analysis#contribute-docs-for-caxxxx-rules
- https://learn.microsoft.com/contribute/dotnet/dotnet-contribute-code-analysis#contribute-docs-for-caxxxx-rules
- https://github.com/dotnet/roslyn-analyzers/blob/main/GuidelinesForNewRules.md
If your Pull Request is doing one of the following:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Roslyn is the compiler platform for .NET. It consists of the compiler itself and

## What are Roslyn Analyzers?

Roslyn analyzers analyze your code for style, quality and maintainability, design and other issues. The documentation for Roslyn Analyzers can be found at [docs.microsoft.com/dotnet/fundamentals/code-analysis/overview](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview).
Roslyn analyzers analyze your code for style, quality and maintainability, design and other issues. The documentation for Roslyn Analyzers can be found at [learn.microsoft.com/dotnet/fundamentals/code-analysis/overview](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview).

Microsoft created a set of analyzers called [Microsoft.CodeAnalysis.NetAnalyzers](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers) that contains the most important "FxCop" rules from static code analysis, converted to Roslyn analyzers, in addition to more analyzers. These analyzers check your code for security, performance, and design issues, among others. The documentation for .NET analyzers can be found [here](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview#code-quality-analysis).

Expand Down Expand Up @@ -38,7 +38,7 @@ Recently the set of analyzer packages produced by this repository have been cons

*Latest pre-release version (.NET7 analyzers):* [here](https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet7/NuGet/Microsoft.CodeAnalysis.NetAnalyzers/versions)

This is the **primary analyzer package** for this repo that contains all **the .NET code analysis rules (CAxxxx)** that are built into the .NET SDK starting .NET5 release. The documentation for CA rules can be found at [docs.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings](https://learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings).
This is the **primary analyzer package** for this repo that contains all **the .NET code analysis rules (CAxxxx)** that are built into the .NET SDK starting .NET5 release. The documentation for CA rules can be found at [learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings](https://learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings).

You do not need to manually install this NuGet package to your project if you are using .NET5 SDK or later. These analyzers are enabled by default for projects targeting .NET5 or later. For projects targeting earlier .NET frameworks, you can enable them in your MSBuild project file by setting one of the following properties:

Expand All @@ -64,9 +64,9 @@ You do not need to manually install this NuGet package to your project if you ar

*Latest stable version:* <sub>[![NuGet](https://img.shields.io/nuget/v/Microsoft.CodeAnalysis.FxCopAnalyzers.svg)](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers)</sub>

This is a migration analyzer package for existing binary FxCop users. It contains all **the ported FxCop code analysis rules (CAxxxx)**. It's recommended to use Microsoft.CodeAnalysis.NetAnalyzers instead. The documentation for that can be found at [docs.microsoft.com/visualstudio/code-quality/install-net-analyzers](https://learn.microsoft.com/visualstudio/code-quality/install-net-analyzers).
This is a migration analyzer package for existing binary FxCop users. It contains all **the ported FxCop code analysis rules (CAxxxx)**. It's recommended to use Microsoft.CodeAnalysis.NetAnalyzers instead. The documentation for that can be found at [learn.microsoft.com/visualstudio/code-quality/install-net-analyzers](https://learn.microsoft.com/visualstudio/code-quality/install-net-analyzers).

The documentation for all the ported and unported FxCop rules can be found at [docs.microsoft.com/en-us/visualstudio/code-quality/fxcop-rule-port-status](https://learn.microsoft.com/visualstudio/code-quality/fxcop-rule-port-status).
The documentation for all the ported and unported FxCop rules can be found at [learn.microsoft.com/visualstudio/code-quality/fxcop-rule-port-status](https://learn.microsoft.com/visualstudio/code-quality/fxcop-rule-port-status).

This analyzer package contains all the ported FxCop rules that are applicable for both *.NetCore/.NetStandard* and *Desktop .NetFramework* projects. You **do not need to install any separate analyzer package from this repo to get target-framework specific FxCop rules**.

Expand Down
2 changes: 1 addition & 1 deletion docs/Analyzer Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ Option Values: [Fully qualified names](https://github.com/dotnet/csharplang/blob

Default Value: empty

This option is used to include customized methods like [Select](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.select?view=net-6.0) into the analysis scope.
This option is used to include customized methods like [Select](https://learn.microsoft.com/dotnet/api/system.linq.enumerable.select?view=net-6.0) into the analysis scope.
Consider the example:

```csharp
Expand Down
2 changes: 1 addition & 1 deletion docs/NetCore_GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- All warnings and errors in these repos are addressed (to prevent build failures)
- `Info` level diagnostics do not need to be fully resolved or suppressed as they do not cause build failures
- Document for review: severity, default, categorization, numbering, titles, messages, and descriptions.
- Create the appropriate documentation for [docs.microsoft.com](https://github.com/dotnet/docs/tree/main/docs/fundamentals/code-analysis/quality-rules) within **ONE WEEK**, instructions available on [Contribute docs for .NET code analysis rules to the .NET docs repository](https://learn.microsoft.com/contribute/dotnet/dotnet-contribute-code-analysis).
- Create the appropriate documentation for [learn.microsoft.com](https://github.com/dotnet/docs/tree/main/docs/fundamentals/code-analysis/quality-rules) within **ONE WEEK**, instructions available on [Contribute docs for .NET code analysis rules to the .NET docs repository](https://learn.microsoft.com/contribute/dotnet/dotnet-contribute-code-analysis).
- PR merged into `dotnet/roslyn-analyzers`.
- Validate the analyzer's behavior with end-to-end testing using the command-line and Visual Studio:
- Use `dotnet new console` and `dotnet build` from the command-line, updating the code to introduce diagnostics and ensuring warnings/errors are reported at the command-line
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# and some (Microbuild) should only be applied to non-PR cases for internal builds.

parameters:
# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
# Job schema parameters - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
cancelTimeoutInMinutes: ''
condition: ''
container: ''
Expand Down
4 changes: 2 additions & 2 deletions eng/common/templates/job/onelocbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ parameters:
# Optional: dependencies of the job
dependsOn: ''

# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
# Optional: A defined YAML pool - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
pool: ''

CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
Expand Down Expand Up @@ -104,4 +104,4 @@ jobs:
PathtoPublish: '$(Build.SourcesDirectory)/eng/Localize/'
PublishLocation: Container
ArtifactName: Loc
condition: ${{ parameters.condition }}
condition: ${{ parameters.condition }}
2 changes: 1 addition & 1 deletion eng/common/templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ parameters:
# Optional: Include PublishBuildArtifacts task
enablePublishBuildArtifacts: false

# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
# Optional: A defined YAML pool - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
pool: {}

# Optional: should run as a public build even in the internal project
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/jobs/codeql-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
# See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
continueOnError: false
# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
# Required: A collection of jobs to run - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
jobs: []
# Optional: if specified, restore and use this version of Guardian instead of the default.
overrideGuardianVersion: ''
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parameters:
# Optional: Include toolset dependencies in the generated graph files
includeToolset: false

# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
# Required: A collection of jobs to run - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
jobs: []

# Optional: Override automatically derived dependsOn value for "publish build assets" job
Expand Down
2 changes: 1 addition & 1 deletion eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
# Two part minimal VS version, e.g. "15.9", "16.0", etc.
# "components": ["componentId1", "componentId2", ...]
# Array of ids of workload components that must be available in the VS instance.
# See e.g. https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017
# See e.g. https://learn.microsoft.com/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017
#
# Returns JSON describing the located VS instance (same format as returned by vswhere),
# or $null if no instance meeting the requirements is found on the machine.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Microsoft.CodeAnalysis.BannedApiAnalyzers.UnitTests
{
// For specification of document comment IDs see https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/documentation-comments#processing-the-documentation-file
// For specification of document comment IDs see https://learn.microsoft.com/dotnet/csharp/language-reference/language-specification/documentation-comments#processing-the-documentation-file

public class SymbolIsBannedAnalyzerTests
{
Expand Down
12 changes: 6 additions & 6 deletions src/NetAnalyzers/Core/AnalyzerReleases.Unshipped.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
CA1510 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1510)
CA1511 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1511)
CA1512 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1512)
CA1513 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)
CA1856 | Performance | Error | ConstantExpectedAnalyzer, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1856)
CA1857 | Performance | Warning | ConstantExpectedAnalyzer, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1857)
CA1510 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1510)
CA1511 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1511)
CA1512 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1512)
CA1513 | Maintainability | Info | UseExceptionThrowHelpers, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1513)
CA1856 | Performance | Error | ConstantExpectedAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1856)
CA1857 | Performance | Warning | ConstantExpectedAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1857)
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void visitEnumSymbol(SymbolStartAnalysisContext context)
}

// This dictionary is populated by this thread and then read concurrently.
// https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=net-5.0#thread-safety
// https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2?view=net-5.0#thread-safety
var membersByValue = PooledDictionary<object, IFieldSymbol>.GetInstance();
var duplicates = PooledConcurrentSet<IFieldSymbol>.GetInstance(SymbolEqualityComparer.Default);
foreach (var member in enumSymbol.GetMembers())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.NetCore.Analyzers.Security.Helpers
/// Just a common way to get <see cref="INamedTypeSymbol"/>s for attributes that affect XML serialization.
/// </summary>
/// <remarks>
/// https://learn.microsoft.com/en-us/dotnet/standard/serialization/attributes-that-control-xml-serialization
/// https://learn.microsoft.com/dotnet/standard/serialization/attributes-that-control-xml-serialization
/// </remarks>
public class XmlSerializationAttributeTypes
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ End Class
[InlineData(DisposeAnalysisKind.NonExceptionPathsOnlyNotDisposed)]
internal async Task DocsMicrosoft_SampleAsync(DisposeAnalysisKind disposeAnalysisKind)
{
// See https://learn.microsoft.com/en-us/visualstudio/code-quality/ca2000
// See https://learn.microsoft.com/visualstudio/code-quality/ca2000

var editorConfigFile = GetEditorConfigContent(disposeAnalysisKind);

Expand Down
2 changes: 1 addition & 1 deletion src/NetAnalyzers/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microsoft.CodeAnalysis.NetAnalyzers

Contains all **the .NET code analysis rules (CAxxxx)** that are built into the .NET SDK starting .NET5 release. The documentation for CA rules can be found at [docs.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings](https://learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings).
Contains all **the .NET code analysis rules (CAxxxx)** that are built into the .NET SDK starting .NET5 release. The documentation for CA rules can be found at [learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings](https://learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings).

You do not need to manually install this NuGet package to your project if you are using .NET5 SDK or later. These analyzers are enabled by default for projects targeting .NET5 or later. For projects targeting earlier .NET frameworks, you can enable them in your MSBuild project file by setting one of the following properties:

Expand Down
2 changes: 1 addition & 1 deletion src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ If you are in the process of annotating an existing project, we recommended to d

Sometimes APIs vary by compilation symbol such as target framework.

For example when using the [`#if` preprocessor directive](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if):
For example when using the [`#if` preprocessor directive](https://learn.microsoft.com/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if):

```c#
public void Foo(string s)
Expand Down
6 changes: 3 additions & 3 deletions src/Utilities/Compiler/Options/EditorConfigOptionNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ internal static partial class EditorConfigOptionNames

/// <summary>
/// String option to configure how many enum values should be prefixed by the enum type name to trigger the rule.
/// Configurable rules: CA1712 (https://learn.microsoft.com/en-us/visualstudio/code-quality/ca1712)
/// Configurable rules: CA1712 (https://learn.microsoft.com/visualstudio/code-quality/ca1712)
/// Allowed method name formats:
/// 1. Any of the enum values starts with the enum type name
/// 2. All of the enum values starts with the enum type name
Expand Down Expand Up @@ -158,7 +158,7 @@ internal static partial class EditorConfigOptionNames

/// <summary>
/// Names of types or namespaces (separated by '|'), such that the type or type's namespace doesn't count in the inheritance hierarchy tree.
/// Configurable rules: CA1501 (https://learn.microsoft.com/en-us/visualstudio/code-quality/ca1501)
/// Configurable rules: CA1501 (https://learn.microsoft.com/visualstudio/code-quality/ca1501)
/// Allowed name formats:
/// 1. Type or namespace name (includes all types with the name, regardless of the containing type or namespace and all types whose namespace contains the name)
/// 2. Type or namespace name ending with a wildcard symbol (includes all types whose name starts with the given name, regardless of the containing type or namespace
Expand All @@ -175,7 +175,7 @@ internal static partial class EditorConfigOptionNames
public const string AnalyzedSymbolKinds = "analyzed_symbol_kinds";

/// <summary>
/// Boolean option to configure if the naming heuristic should be used for CA1303 (https://learn.microsoft.com/en-us/visualstudio/code-quality/ca1303).
/// Boolean option to configure if the naming heuristic should be used for CA1303 (https://learn.microsoft.com/visualstudio/code-quality/ca1303).
/// </summary>
public const string UseNamingHeuristic = "use_naming_heuristic";

Expand Down

0 comments on commit fde4933

Please sign in to comment.