-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: errors from static code analysis (#477)
Fix the errors from the [sonar cloud static code analysis](https://github.com/Testably/Testably.Abstractions/runs/22481531017).
- Loading branch information
Showing
12 changed files
with
290 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
29 changes: 29 additions & 0 deletions
29
Tests/Testably.Abstractions.Testing.Tests/Polyfills/StringExtensionMethods.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#if NET48 | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Testably.Abstractions.Polyfills; | ||
|
||
/// <summary> | ||
/// Provides extension methods to simplify writing platform independent tests. | ||
/// </summary> | ||
[ExcludeFromCodeCoverage] | ||
internal static class StringExtensionMethods | ||
{ | ||
/// <summary> | ||
/// Reports the zero-based index of the first occurrence of the specified string in the current | ||
/// <see langword="string" /> object. A parameter specifies the type of search to use for the specified string. | ||
/// </summary> | ||
/// <returns> | ||
/// The index position of the <paramref name="value" /> parameter if that string is found, or <c>-1</c> if it is not. | ||
/// If <paramref name="value" /> is <see cref="string.Empty" />, the return value is <c>0</c>. | ||
/// </returns> | ||
internal static int IndexOf( | ||
this string @this, | ||
char value, | ||
StringComparison comparison) | ||
{ | ||
return @this.IndexOf($"{value}", comparison); | ||
} | ||
} | ||
#endif |
This file contains 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
Oops, something went wrong.