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 V301…

Examples of errors detected by the V3013 diagnostic

V3013. It is odd that the body of 'Foo_1' function is fully equivalent to the body of 'Foo_2' function.


IronPython and IronRuby

V3013 It is odd that the body of 'IsPositiveOne' function is fully equivalent to the body of 'IsNegativeOne' function (351, line 355). BigDecimal.cs 351


public static bool IsPositiveOne(BigDecimal x) {
  return IsOne(x) && IsPositive(x);
}

public static bool IsNegativeOne(BigDecimal x) {
  return IsOne(x) && IsPositive(x);
}

.NET Compiler Platform ("Roslyn")

V3013 It is odd that the body of 'Whitespace' function is fully equivalent to the body of 'ElasticWhitespace' function (118, line 129). SyntaxFactory.cs 118


public static SyntaxTrivia Whitespace(string text)
{
  return Syntax.InternalSyntax.SyntaxFactory.Whitespace(
           text, elastic: false);
}

public static SyntaxTrivia ElasticWhitespace(string text)
{
  return Syntax.InternalSyntax.SyntaxFactory.Whitespace(
           text, elastic: false);
}

Samples by the Infragistics Company

V3013 It is odd that the body of 'StartCurrent' function is fully equivalent to the body of 'StopCurrent' function (503, line 507). DataViewModel.cs 503


public void StartCurrent()
{
  StartTask("Current");
}

public void StopCurrent()
{
  StartTask("Current");
}

FlashDevelop

V3013 It is odd that the body of 'SuspendMdiClientLayout' function is fully equivalent to the body of 'PerformMdiClientLayout' function (377, line 389). DockPanel.MdiClientController.cs 377


private void SuspendMdiClientLayout()
{
  if (GetMdiClientController().MdiClient != null)
    GetMdiClientController().MdiClient.PerformLayout(); // <=
}

private void PerformMdiClientLayout()
{
  if (GetMdiClientController().MdiClient != null)
    GetMdiClientController().MdiClient.PerformLayout();
}

Similar errors can be found in some other places:

  • V3013 It is odd that the body of 'State11' function is fully equivalent to the body of 'State15' function (532, line 589). Lexer.cs 532

Telerik UI for UWP

V3013 It is odd that the body of 'OnMinValuePropertyChanged' function is fully equivalent to the body of 'OnMaxValuePropertyChanged' function. RadGauge.cs 446


private static void OnMinValuePropertyChanged(DependencyObject sender,
                                              DependencyPropertyChangedEventArgs
                                              args)
{
  double newVal = (double)args.NewValue;
  ValidateValue(newVal);

  RadGauge gauge = sender as RadGauge;
  if (gauge.panel != null)
  {
    gauge.panel.UpdateOnMinMaxValueChange();
  }

  if (AutomationPeer.ListenerExists(AutomationEvents.PropertyChanged))
  {
    var peer = FrameworkElementAutomationPeer.FromElement(gauge)
                                              as RadGaugeAutomationPeer;
    if (peer != null)
    {
      peer.RaiseMinimumPropertyChangedEvent((double)args.OldValue,
                                            (double)args.NewValue);
    }
  }
}

private static void OnMaxValuePropertyChanged(DependencyObject sender,
                                              DependencyPropertyChangedEventArgs
                                              args)
{
  double newVal = (double)args.NewValue;
  ValidateValue(newVal);

  RadGauge gauge = sender as RadGauge;
  if (gauge.panel != null)
  {
    gauge.panel.UpdateOnMinMaxValueChange();
  }

  if (AutomationPeer.ListenerExists(AutomationEvents.PropertyChanged))
  {
    var peer = FrameworkElementAutomationPeer.FromElement(gauge)
                                              as RadGaugeAutomationPeer;
    if (peer != null)
    {
      peer.RaiseMinimumPropertyChangedEvent((double)args.OldValue,
                                            (double)args.NewValue);
    }
  }
}

Emby

V3013 It is odd that the body of 'Read' function is fully equivalent to the body of 'Write' function (407, line 415). BaseSqliteRepository.cs 407


public static IDisposable Read(this ReaderWriterLockSlim obj)
{
  return new WriteLockToken(obj);
}
public static IDisposable Write(this ReaderWriterLockSlim obj)
{
  return new WriteLockToken(obj);
}
private sealed class WriteLockToken : IDisposable
{
  private ReaderWriterLockSlim _sync;
  public WriteLockToken(ReaderWriterLockSlim sync)
  {
    _sync = sync;
    sync.EnterWriteLock();
  }
  public void Dispose()
  {
    if (_sync != null)
    {
      _sync.ExitWriteLock();
      _sync = null;
    }
  }
}

Ryujinx

V3013 It is odd that the body of 'PrintLeft' function is fully equivalent to the body of 'PrintRight' function (10, line 18). PackedTemplateParameter.cs 10


public override void PrintLeft(TextWriter writer)
{
    foreach (BaseNode node in Nodes)
    {
        node.PrintLeft(writer);
    }
}

public override void PrintRight(TextWriter writer)
{
    foreach (BaseNode node in Nodes)
    {
        node.PrintLeft(writer);
    }
}

PeachPie

V3013 It is odd that the body of 'addGlob' function is fully equivalent to the body of 'addPattern' function (506, line 515). ZipArchive.cs 506


public bool addGlob(....)
{
  PhpException.FunctionNotSupported(nameof(addGlob));
  return false;
}

public bool addPattern(....)
{
  PhpException.FunctionNotSupported(nameof(addGlob));
  return false;
}

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