Pour obtenir une clé
d'essai remplissez le formulaire ci-dessous
Demandez des tariffs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
RUB
* En cliquant sur ce bouton, vous acceptez notre politique de confidentialité

Free PVS-Studio license for Microsoft MVP specialists
To get the licence for your open-source project, please fill out this form
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

I am interested to try it on the platforms:
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

Votre message a été envoyé.

Nous vous répondrons à


Si vous n'avez toujours pas reçu de réponse, vérifiez votre dossier
Spam/Junk et cliquez sur le bouton "Not Spam".
De cette façon, vous ne manquerez la réponse de notre équipe.

>
>
>
Examples of errors detected by the V313…

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}");
  ....
}

Ryujinx

V3138 String literal contains potential interpolated expression. Consider inspecting: keyHash. CacheCollection.cs 524


public void AddValue(ref Hash128 keyHash, byte[] value)
{
    if (IsReadOnly)
    {
        Logger.Warning?.Print(LogClass.Gpu,
            "Trying to add {keyHash} on a read-only cache, ignoring.");
        ....
    }
    ....
}

Similar errors can be found in some other places:

  • V3138 String literal contains potential interpolated expression. Consider inspecting: keyHash. CacheCollection.cs 475

.NET 6 libraries

V3138 String literal contains potential interpolated expression. Consider inspecting: _pressureHigh. PhysicalMemoryMonitor.cs 110


internal void SetLimit(int physicalMemoryLimitPercentage)
{
  if (physicalMemoryLimitPercentage == 0)
  {
    // use defaults
    return;
  }
  _pressureHigh = Math.Max(3, physicalMemoryLimitPercentage);
  _pressureLow = Math.Max(1, _pressureHigh - 9);
  Dbg.Trace($"MemoryCacheStats",
            "PhysicalMemoryMonitor.SetLimit:
              _pressureHigh={_pressureHigh}, _pressureLow={_pressureLow}");
}

.NET 6 libraries

V3138 String literal contains potential interpolated expression. Consider inspecting: spec. MetricsEventSource.cs 381


private void ParseSpecs(string? metricsSpecs)
{
  ....
  string[] specStrings = ....
  foreach (string specString in specStrings)
  {
    if (!MetricSpec.TryParse(specString, out MetricSpec spec))
    {
      Log.Message("Failed to parse metric spec: {specString}");
    }
    else
    {
      Log.Message("Parsed metric: {spec}");
      ....
    }
  }
}

Unity C# reference source code

V3138 String literal contains potential interpolated expression. Consider inspecting: type. OverlayUtilities.cs 116


public static Overlay CreateOverlay(Type type)
{
  ....
  if (overlay == null)
  {
    Debug.LogWarning("Overlay of type {type} can not be instantiated." + ....);
    return null;
  }
  ....
}

Orleans

V3138 String literal contains potential interpolated expression. Consider inspecting: type. ExceptionCodec.cs 367


public Exception DeserializeException<TInput>(....)
{
  if (!_typeConverter.TryParse(typeName, out var type))
  {
    ....
  }
  else if (typeof(Exception).IsAssignableFrom(type))
  {
    ....
  }
  else
  {
    throw new NotSupportedException("Type {type} is not supported");
  }
}

Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter