Skip to content

Fix wording in docs/fundamentals/code-analysis #29898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/fundamentals/code-analysis/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ no-loc: ["EditorConfig"]

Code analysis rules have various configuration options. Some of these options are specified as key-value pairs in an [analyzer configuration file](configuration-files.md) using the syntax `<option key> = <option value>`. Other options, which configure code analysis as a whole, are available as properties in your project file.

The most common option you'll configure is a [rule's severity](#severity-level). You can configure the severity level for any rule, including [code quality rules](quality-rules/index.md) and [code style rules](style-rules/index.md). For example, to enable a rule as a warning, add the following key-value pair to an [analyzer configuration file](configuration-files.md) file:
The most common option you'll configure is a [rule's severity](#severity-level). You can configure the severity level for any rule, including [code quality rules](quality-rules/index.md) and [code style rules](style-rules/index.md). For example, to enable a rule as a warning, add the following key-value pair to an [analyzer configuration file](configuration-files.md):

`dotnet_diagnostic.<rule ID>.severity = warning`

Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/code-analysis/quality-rules/ca1851.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Detected multiple enumerations of an `IEnumerable` collection.

Collection with [IEnumerable](xref:System.Collections.IEnumerable) or [IEnumerable\<T\>](xref:System.Collections.Generic.IEnumerable`1) type generated by many LINQ methods like [Select](xref:System.Linq.Enumerable.Select*) or [yield](../../../csharp/language-reference/keywords/yield.md) in C# or [yield statement](../../../visual-basic/language-reference/statements/yield-statement.md) in Visual Basic has the ability to defer enumeration when it is generated. The enumeration will start as long as it is passed into enumeration LINQ methods like [ElementAt](xref:System.Linq.Enumerable.ElementAt*) or used in [for each statement](../../../csharp/language-reference/statements/iteration-statements.md#the-foreach-statement) in C# or [For Each..Next Statement](../../../visual-basic/language-reference//statements/for-each-next-statement.md) in Visual Basic. The enumeration result is not calculated once and cached like [Lazy](xref:System.Lazy`1).

If the enumeration operation itself is expansive, for example, query into the database, multiple enumerations would be harmful to the performance of the program.
If the enumeration operation itself is expensive, for example, a query into a database, multiple enumerations would be harmful to the performance of the program.

If the enumeration operation has side effects, multiple enumerations might result in bugs.

Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/code-analysis/quality-rules/ca1854.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dev_langs:

## Cause

An `IDictionary` element access that's guarded by a `IDictionary.ContainsKey` check.
An `IDictionary` element access that's guarded by an `IDictionary.ContainsKey` check.

## Rule description

Expand Down