Blokyk.Roslyn.ValueNotUsedSuppressor 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Blokyk.Roslyn.ValueNotUsedSuppressor --version 1.0.0                
NuGet\Install-Package Blokyk.Roslyn.ValueNotUsedSuppressor -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blokyk.Roslyn.ValueNotUsedSuppressor" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blokyk.Roslyn.ValueNotUsedSuppressor --version 1.0.0                
#r "nuget: Blokyk.Roslyn.ValueNotUsedSuppressor, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Blokyk.Roslyn.ValueNotUsedSuppressor as a Cake Addin
#addin nuget:?package=Blokyk.Roslyn.ValueNotUsedSuppressor&version=1.0.0

// Install Blokyk.Roslyn.ValueNotUsedSuppressor as a Cake Tool
#tool nuget:?package=Blokyk.Roslyn.ValueNotUsedSuppressor&version=1.0.0                

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.

There are no supported framework assets in this package.

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.

Version Downloads Last updated
1.0.2 1,732 9/18/2022
1.0.1 1,690 9/18/2022
1.0.0 1,731 9/18/2022