Blokyk.Roslyn.ValueNotUsedSuppressor
1.0.2
dotnet add package Blokyk.Roslyn.ValueNotUsedSuppressor --version 1.0.2
NuGet\Install-Package Blokyk.Roslyn.ValueNotUsedSuppressor -Version 1.0.2
<PackageReference Include="Blokyk.Roslyn.ValueNotUsedSuppressor" Version="1.0.2" />
paket add Blokyk.Roslyn.ValueNotUsedSuppressor --version 1.0.2
#r "nuget: Blokyk.Roslyn.ValueNotUsedSuppressor, 1.0.2"
// Install Blokyk.Roslyn.ValueNotUsedSuppressor as a Cake Addin #addin nuget:?package=Blokyk.Roslyn.ValueNotUsedSuppressor&version=1.0.2 // Install Blokyk.Roslyn.ValueNotUsedSuppressor as a Cake Tool #tool nuget:?package=Blokyk.Roslyn.ValueNotUsedSuppressor&version=1.0.2
Ignore "Expression value not used" for fluent interfaces
This diagnostic suppressor allows you to specify a list of types for which method return values can be ignored.
This is particularly useful for "fluent interfaces," such as System.Text.StringBuilder
, where the return values are just the current instance. However, IDE0058 ("Expression value not used") would be reported on such types, even though "using" (i.e. storing) the value was useless. This suppressor was created for this type of situations
Usage
You can configure the types affected by this suppressor by adding the dotnet_fluent_types
key to your .editorconfig
file and then specifying a comma-separated list of (fully-qualified metadata) type names.
For example, if you had an interface FluentRecord<T>
inside the namespace MyStuff.Utils
, you'd add :
dotnet_fluent_types = System.Text.StringBuilder, MyStuff.Utils.FluentRecord`1
The default value for dotnet_fluent_types
is currently System.Text.StringBuilder
.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.