Examples of errors detected by the V3138 diagnostic


V3138. String literal contains potential interpolated expression.


.NET Core Libraries (CoreFX)

V3138 String literal contains potential interpolated expression. Consider inspecting: e. SSPIHandleCache.cs 42


internal static void CacheCredential(SafeFreeCredentials newHandle)
{
  try
  {
    ....
  }
  catch (Exception e)
  {
    if (!ExceptionCheck.IsFatal(e))
    {
      NetEventSource.Fail(null, "Attempted to throw: {e}");
    }
  }
}

.NET Core Libraries (CoreFX)

V3138 String literal contains potential interpolated expression. Consider inspecting: algorithm. AuthenticationHelper.Digest.cs 58


public static async Task<string> GetDigestTokenForCredential(....)
{
  ....
  if (NetEventSource.IsEnabled)
    NetEventSource.Error(digestResponse,
                         "Algorithm not supported: {algorithm}");
  ....
}


Bugs Found

Checked Projects
355
Collected Errors
13 303