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
|[CA1420](quality-rules/ca1420.md)| Interoperability | Warning | .NET 7 | Using features that require runtime marshalling when it's disabled will result in run-time exceptions |
|[CA1857](quality-rules/ca1857.md)| Performance | Warning | .NET 8 | A constant is expected for the parameter |
41
+
|[CA2013](quality-rules/ca2013.md)| Reliability | Warning | .NET 5 | Do not use `ReferenceEquals` with value types |
42
+
|[CA2014](quality-rules/ca2014.md)| Reliability | Warning | .NET 5 | Do not use `stackalloc` in loops |
43
+
|[CA2015](quality-rules/ca2015.md)| Reliability | Warning | .NET 5 | Do not define finalizers for types derived from <xref:System.Buffers.MemoryManager%601>|
|[CA2018](quality-rules/ca2018.md)| Reliability | Warning | .NET 6 | The `count` argument to `Buffer.BlockCopy` should specify the number of bytes to copy |
46
+
|[CA2021](quality-rules/ca2021.md)| Reliability | Warning | .NET 8 | Do not call `Enumerable.Cast<T>` or `Enumerable.OfType<T>` with incompatible types |
|[CA2247](quality-rules/ca2247.md)| Usage | Warning | .NET 5 | Argument passed to `TaskCompletionSource` constructor should be <xref:System.Threading.Tasks.TaskCreationOptions> enum instead of <xref:System.Threading.Tasks.TaskContinuationOptions>|
51
+
|[CA2252](quality-rules/ca2252.md)| Usage | Error | .NET 6 | Opt in to preview features |
52
+
|[CA2255](quality-rules/ca2255.md)| Usage | Warning | .NET 6 | The `ModuleInitializer` attribute should not be used in libraries |
53
+
|[CA2256](quality-rules/ca2256.md)| Usage | Warning | .NET 6 | All members declared in parent interfaces must have an implementation in a `DynamicInterfaceCastableImplementation`-attributed interface |
54
+
|[CA2257](quality-rules/ca2257.md)| Usage | Warning | .NET 6 | Members defined on an interface with the `DynamicInterfaceCastableImplementationAttribute` should be `static`|
55
+
|[CA2258](quality-rules/ca2258.md)| Usage | Warning | .NET 6 | Providing a `DynamicInterfaceCastableImplementation` interface in Visual Basic is unsupported |
|[CA1417](quality-rules/ca1417.md)| Interoperability | Warning | Do not use `OutAttribute` on string parameters for P/Invokes |
100
-
|[CA1418](quality-rules/ca1418.md)| Interoperability | Warning | Use valid platform string |
101
-
|[CA1420](quality-rules/ca1420.md)| Interoperability | Warning | Using features that require runtime marshalling when it's disabled will result in run-time exceptions |
|[CA2247](quality-rules/ca2247.md)| Usage | Warning | Argument passed to `TaskCompletionSource` constructor should be <xref:System.Threading.Tasks.TaskCreationOptions> enum instead of <xref:System.Threading.Tasks.TaskContinuationOptions>|
111
-
|[CA2252](quality-rules/ca2252.md)| Usage | Error | Opt in to preview features |
112
-
|[CA2255](quality-rules/ca2255.md)| Usage | Warning | The `ModuleInitializer` attribute should not be used in libraries |
113
-
|[CA2256](quality-rules/ca2256.md)| Usage | Warning | All members declared in parent interfaces must have an implementation in a `DynamicInterfaceCastableImplementation`-attributed interface |
114
-
|[CA2257](quality-rules/ca2257.md)| Usage | Warning | Members defined on an interface with the `DynamicInterfaceCastableImplementationAttribute` should be `static`|
115
-
|[CA2258](quality-rules/ca2258.md)| Usage | Warning | Providing a `DynamicInterfaceCastableImplementation` interface in Visual Basic is unsupported |
116
-
|[CA2259](quality-rules/ca2259.md)| Usage | Warning |`ThreadStatic` only affects static fields |
117
-
|[CA2260](quality-rules/ca2260.md)| Usage | Warning | Use correct type parameter |
118
-
119
127
---
120
128
121
129
You can change the severity of these rules to disable them or elevate them to errors. You can also [enable more rules](#enable-additional-rules).
122
130
123
-
- For a list of rules that are included with each .NET SDK version, see [Analyzer releases](https://github.com/dotnet/roslyn-analyzers/blob/main/src/NetAnalyzers/Core/AnalyzerReleases.Shipped.md).
131
+
- For a list of rules that are included with each .NET SDK version, see [Analyzer releases](https://github.com/dotnet/sdk/blob/main/src/Microsoft.CodeAnalysis.NetAnalyzers/src/Microsoft.CodeAnalysis.NetAnalyzers/AnalyzerReleases.Shipped.md).
124
132
- For a list of all the code quality rules, see [Code quality rules](quality-rules/index.md).
Copy file name to clipboardExpand all lines: docs/fundamentals/code-analysis/quality-rules/ca1001.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
@@ -22,7 +22,7 @@ dev_langs:
22
22
|**Title**| Types that own disposable fields should be disposable |
23
23
|**Category**|[Design](design-warnings.md)|
24
24
|**Fix is breaking or non-breaking**| Non-breaking - If the type is not visible outside the assembly.<br/><br/>Breaking - If the type is visible outside the assembly. |
Copy file name to clipboardExpand all lines: docs/fundamentals/code-analysis/quality-rules/ca1008.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
@@ -22,7 +22,7 @@ dev_langs:
22
22
|**Title**| Enums should have zero value |
23
23
|**Category**|[Design](design-warnings.md)|
24
24
|**Fix is breaking or non-breaking**| Non-breaking - When you're prompted to add a `None` value to a non-flag enumeration. Breaking - When you're prompted to rename or remove any enumeration values. |
0 commit comments