Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules

This commit is contained in:
Kwoth
2022-02-02 01:44:45 +01:00
parent b22cd5a81e
commit ffa2c3f119
202 changed files with 2108 additions and 920 deletions

View File

@@ -78,7 +78,11 @@ public class BotStrings : IBotStrings
Log.Warning("'{CommandName}' doesn't exist in 'en-US' command strings. Please report this",
commandName);
return new() { Args = new[] { "" }, Desc = "?" };
return new()
{
Args = new[] { "" },
Desc = "?"
};
}
// Log.Warning(@"'{CommandName}' command strings don't exist in '{LanguageName}' culture.

View File

@@ -24,6 +24,7 @@ public class LocalFileStringsSource : IStringsSource
{
var outputDict = new Dictionary<string, Dictionary<string, string>>();
foreach (var file in Directory.GetFiles(_responsesPath))
{
try
{
var langDict = JsonConvert.DeserializeObject<Dictionary<string, string>>(File.ReadAllText(file));
@@ -34,6 +35,7 @@ public class LocalFileStringsSource : IStringsSource
{
Log.Error(ex, "Error loading {FileName} response strings: {ErrorMessage}", file, ex.Message);
}
}
return outputDict;
}
@@ -44,6 +46,7 @@ public class LocalFileStringsSource : IStringsSource
var outputDict = new Dictionary<string, Dictionary<string, CommandStrings>>();
foreach (var file in Directory.GetFiles(_commandsPath))
{
try
{
var text = File.ReadAllText(file);
@@ -55,6 +58,7 @@ public class LocalFileStringsSource : IStringsSource
{
Log.Error(ex, "Error loading {FileName} command strings: {ErrorMessage}", file, ex.Message);
}
}
return outputDict;
}

View File

@@ -47,7 +47,11 @@ public class RedisBotStringsProvider : IBotStringsProvider
return null;
var args = Array.ConvertAll(argsStr.Split('&'), HttpUtility.UrlDecode);
return new() { Args = args, Desc = descStr };
return new()
{
Args = args,
Desc = descStr
};
}
public void Reload()