From 53110356d1e99188e33dc845bbe9ef93e0a283af Mon Sep 17 00:00:00 2001 From: Dave Callan <106764096+davepcallan@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:25:27 +0000 Subject: [PATCH 1/2] Add title to new analyzer CA2265 link In the table of new .NET 9 analyzers, rule CA2265 is missing the title from the link. Add it for consistency with other rules and UX. --- docs/core/whats-new/dotnet-9/sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-9/sdk.md b/docs/core/whats-new/dotnet-9/sdk.md index 05cfc39981d23..a0fd33b26d78f 100644 --- a/docs/core/whats-new/dotnet-9/sdk.md +++ b/docs/core/whats-new/dotnet-9/sdk.md @@ -221,4 +221,4 @@ Environment variables that the container publish tooling uses to control some of | [CA2262: Set 'MaxResponseHeadersLength' properly](../../../fundamentals/code-analysis/quality-rules/ca2262.md) | Usage | The property is measured in kilobytes, not bytes. | | [CA2263: Prefer generic overload when type is known](../../../fundamentals/code-analysis/quality-rules/ca2263.md) | Usage | Generic overloads are preferable to overloads that accept an argument of type when the type is known at compile time. | | [CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'](../../../fundamentals/code-analysis/quality-rules/ca2264.md) | Usage | Certain constructs like non-nullable structs (except for ), 'nameof()' expressions, and 'new' expressions are known to never be null, so `ArgumentNullException.ThrowIfNull` will never throw. | -| [CA2265](../../../fundamentals/code-analysis/quality-rules/ca2265.md) | Usage | Comparing a span to `null` or `default` might not do what you intended. `default` and the `null` literal are implicitly converted to . Remove the redundant comparison or make the code more explicit by using `IsEmpty`. | +| [CA2265: Do not compare Span to null or default](../../../fundamentals/code-analysis/quality-rules/ca2265.md) | Usage | Comparing a span to `null` or `default` might not do what you intended. `default` and the `null` literal are implicitly converted to . Remove the redundant comparison or make the code more explicit by using `IsEmpty`. | From 2da72f059b33d148a1e3ee96bd35da90b8acb664 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:42:50 -0800 Subject: [PATCH 2/2] Update docs/core/whats-new/dotnet-9/sdk.md --- docs/core/whats-new/dotnet-9/sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-9/sdk.md b/docs/core/whats-new/dotnet-9/sdk.md index a0fd33b26d78f..d5966c40e2f23 100644 --- a/docs/core/whats-new/dotnet-9/sdk.md +++ b/docs/core/whats-new/dotnet-9/sdk.md @@ -221,4 +221,4 @@ Environment variables that the container publish tooling uses to control some of | [CA2262: Set 'MaxResponseHeadersLength' properly](../../../fundamentals/code-analysis/quality-rules/ca2262.md) | Usage | The property is measured in kilobytes, not bytes. | | [CA2263: Prefer generic overload when type is known](../../../fundamentals/code-analysis/quality-rules/ca2263.md) | Usage | Generic overloads are preferable to overloads that accept an argument of type when the type is known at compile time. | | [CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'](../../../fundamentals/code-analysis/quality-rules/ca2264.md) | Usage | Certain constructs like non-nullable structs (except for ), 'nameof()' expressions, and 'new' expressions are known to never be null, so `ArgumentNullException.ThrowIfNull` will never throw. | -| [CA2265: Do not compare Span to null or default](../../../fundamentals/code-analysis/quality-rules/ca2265.md) | Usage | Comparing a span to `null` or `default` might not do what you intended. `default` and the `null` literal are implicitly converted to . Remove the redundant comparison or make the code more explicit by using `IsEmpty`. | +| [CA2265: Do not compare `Span` to null or default](../../../fundamentals/code-analysis/quality-rules/ca2265.md) | Usage | Comparing a span to `null` or `default` might not do what you intended. `default` and the `null` literal are implicitly converted to . Remove the redundant comparison or make the code more explicit by using `IsEmpty`. |