Add rule to use discard for unnecessary assignment of a value
MODIFY
.editorconfig
.editorconfig
@@ -221,6 +221,9 @@ dotnet_style_prefer_auto_properties = true:error
# IDE0057: Use range operator
csharp_style_prefer_range_operator = true:error
+# IDE0059: Unnecessary assignment of a value
+csharp_style_unused_value_assignment_preference = discard_variable:error
+
[*.xaml]
indent_style = space
indent_size = 2

MODIFY
WalletWasabi.Tests/UnitTests/NBitcoinTests.cs
WalletWasabi.Tests/UnitTests/NBitcoinTests.cs
@@ -36,13 +36,12 @@ namespace WalletWasabi.Tests.UnitTests
var (tx0, c0) = CreateTransaction();
var (tx1, c1) = CreateTransaction();
var (tx2, c2) = CreateTransaction();
-
- var (tx3, c3) = CreateTransaction(c0[0], c0[1], c1[0]);
+ var (tx3, _) = CreateTransaction(c0[0], c0[1], c1[0]);
var (tx4, c4) = CreateTransaction(c0[2], c1[2]);
var (tx5, c5) = CreateTransaction(c4[1], c4[2]);
var (tx6, c6) = CreateTransaction(c5[0]);
- var (tx7, c7) = CreateTransaction(c6[2], c2[0]);
+ var (tx7, _) = CreateTransaction(c6[2], c2[0]);
var graph = new[] { tx0, tx1, tx2, tx7, tx5, tx3, tx4, tx6 }.ToDependencyGraph();

MODIFY
WalletWasabi/Mono/OptionSet.cs
WalletWasabi/Mono/OptionSet.cs
@@ -743,7 +743,7 @@ namespace Mono.Options
continue;
}
- if (p is Category c)
+ if (p is Category)
{
WriteDescription(o, p.Description, "", 140, 140);
continue;

Add rule to use discard for unnecessary assignment of a value