GU0009

November 24, 2021 ยท View on GitHub

Name the boolean argument

TopicValue
IdGU0009
SeverityWarning
EnabledTrue
CategoryGu.Analyzers.Correctness
CodeArgumentAnalyzer

Description

The unnamed boolean argument aren't obvious about their purpose. Consider naming the boolean argument for clarity.

Motivation

ADD MOTIVATION HERE

How to fix violations

ADD HOW TO FIX VIOLATIONS HERE

Configure severity

Via ruleset file.

Configure the severity per project, for more info see MSDN.

Via #pragma directive.

#pragma warning disable GU0009 // Name the boolean argument
Code violating the rule here
#pragma warning restore GU0009 // Name the boolean argument

Or put this at the top of the file to disable all instances.

#pragma warning disable GU0009 // Name the boolean argument

Via attribute [SuppressMessage].

[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness", 
    "GU0009:Name the boolean argument", 
    Justification = "Reason...")]