Fix compliance findings in Frends.Regex.IsMatch (net8, metadata, Options/CancellationToken, Success/Error)#29
Merged
Conversation
…uct/PackageProjectUrl metadata, Options/CancellationToken params, Success/Error result properties
Copilot
AI
changed the title
[WIP] Fix compliance findings in Frends.Regex.IsMatch
Fix compliance findings in Frends.Regex.IsMatch (net8, metadata, Options/CancellationToken, Success/Error)
Jul 23, 2026
jefim
reviewed
Jul 23, 2026
| InputText = "not empty", | ||
| RegularExpression = "" | ||
| }); | ||
| }, DefaultOptions, CancellationToken.None); |
Contributor
There was a problem hiding this comment.
use default instead of cancelationtoken.none across these tests
Contributor
Author
There was a problem hiding this comment.
Done — replaced all CancellationToken.None with default across the tests.
jefim
requested changes
Jul 23, 2026
| /// Custom error message used when ThrowErrorOnFailure is enabled or an error result is returned. | ||
| /// Leave empty to use the original exception message. | ||
| /// </summary> | ||
| /// <example></example> |
Contributor
Author
There was a problem hiding this comment.
Updated the example to Regex match failed.
| /// <summary> | ||
| /// Error information, populated when Success is false. | ||
| /// </summary> | ||
| public Error Error { get; private set; } |
Contributor
Author
There was a problem hiding this comment.
Added <example>null</example> to the Error property (it's null on a successful result).
jefim
marked this pull request as ready for review
July 23, 2026 10:54
…improve examples in Options and Result
jefim
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves multiple compliance scanner findings (metadata, target framework, FT0007, FT0011) in
Frends.Regex.IsMatch. AddingOptionsandCancellationTokenparameters is a breaking change, hence the major version bump.csproj metadata
TargetFramework:net6.0→net8.0<Company>Frends</Company>,<Product>Frends</Product>PackageProjectUrl→https://frends.com/1.1.0→2.0.0New definitions
Options—ThrowErrorOnFailure(defaulttrue),ErrorMessageOnFailureError—Message,AdditionalInfoTask method (FT0007)
Added required
OptionsandCancellationTokenparameters:Result class (FT0011)
Added
Success(bool) andErrorproperties. On success:Success=true,Error=null. On handled failure (ThrowErrorOnFailure=false):Success=false,Errorpopulated.Error handling
Input null-checks still throw
ArgumentNullExceptiondirectly. The regex execution is wrapped in try/catch — cancellation always rethrows; other exceptions either throw or return an error result based onOptions.ThrowErrorOnFailure.