Skip to content

Commit 122750b

Browse files
authored
Fix grammar and wording in /docs/fundamentals/code-analysis/quality-rules (#31477)
1 parent 068e890 commit 122750b

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

docs/fundamentals/code-analysis/quality-rules/ca1826.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ This rule analyzes the following collection types:
3232

3333
- A type that implements <xref:System.Collections.Generic.IReadOnlyList%601>, but not <xref:System.Collections.Generic.IList%601>
3434

35-
This rule flags calls to following methods on these collection types:
35+
This rule flags calls to the following methods on these collection types:
3636

3737
- <xref:System.Linq.Enumerable.Count%2A?displayProperty=fullName> method
3838
- <xref:System.Linq.Enumerable.First%2A?displayProperty=fullName> method
3939
- <xref:System.Linq.Enumerable.FirstOrDefault%2A?displayProperty=fullName> method
4040
- <xref:System.Linq.Enumerable.Last%2A?displayProperty=fullName> method
4141
- <xref:System.Linq.Enumerable.LastOrDefault%2A?displayProperty=fullName> method
4242

43-
The analyzed collection types and/or methods may be extended in future to cover more cases.
43+
The analyzed collection types and/or methods may be extended in the future to cover more cases.
4444

4545
## How to fix violations
4646

docs/fundamentals/code-analysis/quality-rules/ca1827.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.author: mavasani
2222

2323
## Cause
2424

25-
The <xref:System.Linq.Enumerable.Count%2A> or <xref:System.Linq.Enumerable.LongCount%2A> method was used where <xref:System.Linq.Enumerable.Any%2A> method would be more efficient.
25+
The <xref:System.Linq.Enumerable.Count%2A> or <xref:System.Linq.Enumerable.LongCount%2A> method was used where the <xref:System.Linq.Enumerable.Any%2A> method would be more efficient.
2626

2727
## Rule description
2828

docs/fundamentals/code-analysis/quality-rules/ca1828.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.author: mavasani
2222

2323
## Cause
2424

25-
<xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.CountAsync%2A> or The <xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.LongCountAsync%2A> method was used where the <xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.AnyAsync%2A> method would be more efficient.
25+
The <xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.CountAsync%2A> or <xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.LongCountAsync%2A> method was used where the <xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.AnyAsync%2A> method would be more efficient.
2626

2727
## Rule description
2828

docs/fundamentals/code-analysis/quality-rules/ca1829.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This rule flags <xref:System.Linq.Enumerable.Count%2A> calls on the following co
3939
- <xref:System.Collections.Generic.ICollection%601?displayProperty=fullName>
4040
- <xref:System.Collections.Generic.IReadOnlyCollection%601?displayProperty=fullName>
4141

42-
The analyzed collection types may be extended in future to cover more cases.
42+
The analyzed collection types may be extended in the future to cover more cases.
4343

4444
## How to fix violations
4545

docs/fundamentals/code-analysis/quality-rules/ca2244.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ An object initializer has more than one indexed element initializer with the sam
2626

2727
[Object initializers](../../../csharp/programming-guide/classes-and-structs/object-and-collection-initializers.md#object-initializers) let you assign values to any accessible fields or properties of an object at creation time without having to invoke a constructor followed by lines of assignment statements.
2828

29-
Indexed element initializers in objects initializers must initialize unique elements. A duplicate index will overwrite a previous element initialization.
29+
Indexed element initializers in object initializers must initialize unique elements. A duplicate index will overwrite a previous element initialization.
3030

3131
## How to fix violations
3232

docs/fundamentals/code-analysis/quality-rules/ca2252.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ There are two ways to fix violations:
5454

5555
## When to suppress warnings
5656

57-
Suppressing warnings from this rule is only recommended for advanced use cases where diagnostics on APIs need to explicitly disabled. In this case, you must be willing to take on the responsibility of marking preview APIs appropriately. For example, consider a case where an existing type implements a new preview interface. Since the entire type cannot be marked as preview (for backwards compatibility), the diagnostic around the type definition can be disabled locally. Further, you need to mark the preview interface implementations as preview. Now, the existing type can be used as before, but calls to the new interface methods will get diagnostics. *System.Private.CoreLib.csproj* uses this technique to expose generic math features on numeric types such as `Int32`, `Double`, and `Decimal`.
57+
Suppressing warnings from this rule is only recommended for advanced use cases where diagnostics on APIs need to be explicitly disabled. In this case, you must be willing to take on the responsibility of marking preview APIs appropriately. For example, consider a case where an existing type implements a new preview interface. Since the entire type cannot be marked as preview (for backwards compatibility), the diagnostic around the type definition can be disabled locally. Further, you need to mark the preview interface implementations as preview. Now, the existing type can be used as before, but calls to the new interface methods will get diagnostics. *System.Private.CoreLib.csproj* uses this technique to expose generic math features on numeric types such as `Int32`, `Double`, and `Decimal`.
5858

5959
The following images show how to disable the CA2252 analyzer locally.
6060

0 commit comments

Comments
 (0)