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

Examples of errors detected by the V3117 diagnostic

V3117. Constructor parameter is not used.


PowerShell

V3117 Constructor parameter 'errorCategory_Message' is not used. System.Management.Automation ErrorPackage.cs 1125


private void PopulateProperties(
  Exception exception,
  object targetObject,
  string fullyQualifiedErrorId,
  ErrorCategory errorCategory,
  string errorCategory_Activity,
  string errorCategory_Reason,
  string errorCategory_TargetName,
  string errorCategory_TargetType,
  string errorCategory_Message,
  string errorDetails_Message,
  string errorDetails_RecommendedAction,
  string errorDetails_ScriptStackTrace)
{ .... }

internal ErrorRecord(
  Exception exception,
  object targetObject,
  string fullyQualifiedErrorId,
  ErrorCategory errorCategory,
  string errorCategory_Activity,
  string errorCategory_Reason,
  string errorCategory_TargetName,
  string errorCategory_TargetType,
  string errorCategory_Message,
  string errorDetails_Message,
  string errorDetails_RecommendedAction)
{
  PopulateProperties(
    exception,
    targetObject,
    fullyQualifiedErrorId,
    errorCategory,
    errorCategory_Activity,
    errorCategory_Reason,
    errorCategory_TargetName,
    errorCategory_TargetType,
    errorDetails_Message,            // <=
    errorDetails_Message,            // <=
    errorDetails_RecommendedAction,
    null);
}

Infer.NET

V3117 Constructor parameter 'useLazyQuantifier' is not used. Runtime RegexpFormattingSettings.cs 38


public RegexpFormattingSettings(
         bool putOptionalInSquareBrackets,
         bool showAnyElementAsQuestionMark,
         bool ignoreElementDistributionDetails,
         int truncationLength,
         bool escapeCharacters,
         bool useLazyQuantifier)
{
  this.PutOptionalInSquareBrackets = putOptionalInSquareBrackets;
  this.ShowAnyElementAsQuestionMark = showAnyElementAsQuestionMark;
  this.IgnoreElementDistributionDetails = ignoreElementDistributionDetails;
  this.TruncationLength = truncationLength;
  this.EscapeCharacters = escapeCharacters;
}

FastReport

V3117 Constructor parameter 'iniCapacity' is not used. FastString.cs 434


public FastString(int iniCapacity)
{
  Init(initCapacity);
}

.NET Core Libraries (CoreFX)

V3117 Constructor parameter 'securityUrl' is not used. XmlSecureResolver.cs 15


public XmlSecureResolver(XmlResolver resolver, string securityUrl)
{
  _resolver = resolver;
}

.NET Core Libraries (CoreFX)

V3117 Constructor parameter 'checkSecurity' is not used. ObjectManager.cs 33


internal ObjectManager(
  ISurrogateSelector selector,
  StreamingContext context,
  bool checkSecurity,
  bool isCrossAppDomain)
{
  _objects = new ObjectHolder[DefaultInitialSize];
  _selector = selector;
  _context = context;
  _isCrossAppDomain = isCrossAppDomain;
}

.NET Core Libraries (CoreFX)

V3117 Constructor parameter 'userOptions' is not used. DbConnectionPool.cs 26


private sealed class PendingGetConnection
{
  public PendingGetConnection(
           long dueTime,
           DbConnection owner,
           TaskCompletionSource<DbConnectionInternal> completion,
           DbConnectionOptions userOptions)
  {
    DueTime = dueTime;
    Owner = owner;
    Completion = completion;
  }

  public long DueTime { get; private set; }
  public DbConnection Owner { get; private set; }
  public TaskCompletionSource<DbConnectionInternal>
           Completion { get; private set; }
  public DbConnectionOptions UserOptions { get; private set; }
}

AvaloniaUI

V3117 Constructor parameter 'phones' is not used. Country.cs 25


public Country(string name,
               string region,
               int population,
               int area,
               double density,
               double coast,
               double? migration,
               double? infantMorality,
               int gdp,
               double? literacy,
               double? phones,
               double? birth,
               double? death)
{
  Name = name;
  Region = region;
  Population = population;
  Area = area;
  PopulationDensity = density;
  CoastLine = coast;
  NetMigration = migration;
  InfantMortality = infantMorality;
  GDP = gdp;
  LiteracyPercent = literacy;
  BirthRate = birth;
  DeathRate = death;
}

Ryujinx

V3117 Constructor parameter 'context' is not used. IAccountServiceForAdministrator.cs 12


public IAccountServiceForAdministrator(ServiceCtx context,
    AccountServiceFlag serviceFlag)
{
    _applicationServiceServer = new ApplicationServiceServer(serviceFlag);
}

Similar errors can be found in some other places:

  • V3117 Constructor parameter 'context' is not used. IAccountServiceForApplication.cs 13
  • V3117 Constructor parameter 'context' is not used. IAccountServiceForSystemService.cs 11
  • V3117 Constructor parameter 'context' is not used. IDeliveryCacheStorageService.cs 12
  • And 6 additional diagnostic messages.

.NET 6 libraries

V3117 Constructor parameter 'options' is not used. JsonObject.cs 35


public sealed partial class JsonObject : JsonNode
{
  ....
  public JsonObject(JsonNodeOptions? options = null) : base(options) { }

  public JsonObject(IEnumerable<KeyValuePair<string, JsonNode?>> properties,
                    JsonNodeOptions? options = null)
  {
    foreach (KeyValuePair<string, JsonNode?> node in properties)
    {
      Add(node.Key, node.Value);
    }
  }
  ....
}

Discord.NET

V3117 Constructor parameter 'after' is not used. ThreadUpdateAuditLogData.cs 13


public class ThreadUpdateAuditLogData : IAuditLogData
{
  private ThreadUpdateAuditLogData(IThreadChannel thread,
                                   ThreadType type,
                                   ThreadInfo before,
                                   ThreadInfo after)
  {
    Thread = thread;
    ThreadType = type;
    Before = before;
    After = After;
  }
  ....
}

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