Add rule to make local functions static
MODIFY
.editorconfig
.editorconfig
@@ -115,6 +115,9 @@ csharp_prefer_simple_using_statement = true:error
# IDE0054: Use compound assignment
dotnet_style_prefer_compound_assignment = true:error
+# IDE0062: Make local function 'static'
+csharp_prefer_static_local_function = true:error
+
# name all constant or static fields using PascalCase
dotnet_naming_rule.constant_or_static_fields_should_be_pascal_case.severity = error

MODIFY
WalletWasabi.Tests/UnitTests/IoTests.cs
WalletWasabi.Tests/UnitTests/IoTests.cs
@@ -51,7 +51,7 @@ namespace WalletWasabi.Tests.UnitTests
// Read back the content and check.
- bool IsStringArraysEqual(string[] lines1, string[] lines2)
+ static bool IsStringArraysEqual(string[] lines1, string[] lines2)
{
if (lines1.Length != lines2.Length)
{
@@ -201,7 +201,7 @@ namespace WalletWasabi.Tests.UnitTests
IoHelpers.EnsureContainingDirectoryExists(ioman.FilePath);
File.Create(ioman.FilePath).Dispose();
- string RandomString()
+ static string RandomString()
{
StringBuilder builder = new StringBuilder();
var rnd = new Random();

Add rule to make local functions static