Doc updates#23
Conversation
Code Review by Qodo
1. K&R brace in TryGetValidatableParameterInfo
|
| [Experimental("ASP0029", UrlFormat = "https://aka.ms/aspnet/analyzer/{0}")] | ||
| public bool TryGetValidatableParameterInfo(ParameterInfo parameterInfo, [NotNullWhen(true)] out IValidatableInfo? validatableInfo) | ||
| { | ||
| public bool TryGetValidatableParameterInfo(ParameterInfo parameterInfo, [NotNullWhen(true)] out IValidatableInfo? validatableInfo) { |
There was a problem hiding this comment.
1. K&r brace in trygetvalidatableparameterinfo 📘 Rule violation ✓ Correctness
• TryGetValidatableParameterInfo places the opening brace on the same line as the method declaration, which violates the required Allman brace style. • This introduces an inconsistent style within the codebase and may fail style analyzers/enforcement that expect braces on a new line.
Agent prompt
## Issue description
The method `TryGetValidatableParameterInfo` uses K&R brace placement (`{` on the same line), violating the required Allman brace style.
## Issue Context
Allman style requires opening braces on a new line for methods/classes/control-flow blocks.
## Fix Focus Areas
- src/Validation/src/ValidationOptions.cs[66-66]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| /// <summary> | ||
| /// Gets or sets a strictly positive value representing the maximum retained file count or null for no limit. | ||
| /// Defaults to <c>2</c>. | ||
| /// Gets or sets a strictly positive value representing the maximum retained file count. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The maximum retained file count, or <see langword="null" /> for no limit. | ||
| /// The default is 2. | ||
| /// </value> | ||
| public int? RetainedFileCountLimit | ||
| { | ||
| get { return _retainedFileCountLimit; } | ||
| set | ||
| { | ||
| if (value <= 0) | ||
| if (value < 0) | ||
| { | ||
| throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(RetainedFileCountLimit)} must be positive."); | ||
| } |
There was a problem hiding this comment.
2. retainedfilecountlimit allows 0 📘 Rule violation ⛯ Reliability
• The property documentation and exception message state the value must be positive, but the new validation only throws when value < 0, allowing 0. • This is a boundary/edge-case inconsistency that can lead to confusing configuration behavior and misleading error handling/documentation.
Agent prompt
## Issue description
`RetainedFileCountLimit` is documented as "strictly positive" and throws an exception saying it "must be positive", but the current check only rejects negative values, allowing `0`.
## Issue Context
This is a boundary-value handling inconsistency that can confuse consumers and violate the documented behavior.
## Fix Focus Areas
- src/Logging.AzureAppServices/src/AzureFileLoggerOptions.cs[41-58]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| /// <summary> | ||
| /// Gets or sets the maximum size of the background log message queue or null for no limit. | ||
| /// After maximum queue size is reached log event sink would start blocking. | ||
| /// Defaults to <c>1000</c>. | ||
| /// Gets or sets the maximum size of the background log message queue, or null for no limit. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The maximum size of the background log message queue, or <see langword="null" /> for no limit. The default is 1000. | ||
| /// </value> | ||
| /// <remarks> | ||
| /// After the maximum queue size is reached, the log event sink starts blocking. | ||
| /// </remarks> | ||
| public int? BackgroundQueueSize | ||
| { | ||
| get { return _backgroundQueueSize; } | ||
| set | ||
| { | ||
| if (value < 0) | ||
| if (value <= 0) | ||
| { | ||
| throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BackgroundQueueSize)} must be non-negative."); | ||
| } |
There was a problem hiding this comment.
3. backgroundqueuesize rejects 0 📘 Rule violation ⛯ Reliability
• The exception message says BackgroundQueueSize "must be non-negative", but the new check throws when value <= 0, rejecting 0. • This creates a boundary/edge-case mismatch between validation behavior and the error message, reducing the actionability/accuracy of error handling.
Agent prompt
## Issue description
`BackgroundQueueSize` throws for `0` (`value <= 0`) but the exception message states it "must be non-negative" (which includes `0`).
## Issue Context
This is a boundary-value inconsistency that can confuse users and violates robust, accurate error handling expectations.
## Fix Focus Areas
- src/Logging.AzureAppServices/src/BatchingLoggerOptions.cs[33-52]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Benchmark PR from qodo-benchmark#96