mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
resolve some FxCop warnings
This commit is contained in:
parent
8ce7ba9c6f
commit
f06673828f
3 changed files with 3 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ public static bool IsValidHttpOrHttpsUrl(this string source) =>
|
|||
public static int GetNthIndexOfChar(this string s, int n, char t)
|
||||
{
|
||||
if (n < 1)
|
||||
throw new ArgumentOutOfRangeException();
|
||||
throw new ArgumentOutOfRangeException($"n = {n}");
|
||||
var nthIndexOfChar = s.TakeWhile(c => (n -= c == t ? 1 : 0) > 0).Count();
|
||||
return nthIndexOfChar == s.Length ? -1 : nthIndexOfChar;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,5 +70,6 @@
|
|||
</Rules>
|
||||
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
|
||||
<Rule Id="CA2007" Action="None" />
|
||||
<Rule Id="CA1707" Action="None" />
|
||||
</Rules>
|
||||
</RuleSet>
|
||||
|
|
@ -70,5 +70,6 @@
|
|||
</Rules>
|
||||
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
|
||||
<Rule Id="CA2007" Action="None" />
|
||||
<Rule Id="CA1707" Action="None" />
|
||||
</Rules>
|
||||
</RuleSet>
|
||||
Loading…
Reference in a new issue