Skip to content

Commit

Permalink
Remove overactive assertion. (#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
Larry Golding authored Jul 4, 2020
1 parent 46c523e commit 7c564ed
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/Sarif/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,7 @@ public static string GetMessageText(this Result result, ReportingDescriptor rule

internal static string GetFormattedMessage(string formatString, string[] arguments)
{
string formattedMessage = null;

#if DEBUG
int argumentsCount = arguments.Length;
for (int i = 0; i < argumentsCount; i++)
{
// If this assert fires, there are too many arguments for the specifier
// or there is an argument is skipped or not consumed in the specifier
Debug.Assert(formatString.Contains("{" + i.ToString(CultureInfo.InvariantCulture) + "}"));
}
#endif

formattedMessage = string.Format(CultureInfo.InvariantCulture, formatString, arguments);
string formattedMessage = string.Format(CultureInfo.InvariantCulture, formatString, arguments);

return formattedMessage ?? string.Empty;
}
Expand Down

0 comments on commit 7c564ed

Please sign in to comment.