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

@@ -42,7 +42,8 @@ public sealed class BotCredsProvider : IBotCredsProvider
public BotCredsProvider(int? totalShards = null)
{
_totalShards = totalShards;
if (!File.Exists(CredsExamplePath)) File.WriteAllText(CredsExamplePath, Yaml.Serializer.Serialize(_creds));
if (!File.Exists(CredsExamplePath))
File.WriteAllText(CredsExamplePath, Yaml.Serializer.Serialize(_creds));
MigrateCredentials();
@@ -79,9 +80,17 @@ public sealed class BotCredsProvider : IBotCredsProvider
|| string.IsNullOrWhiteSpace(_creds.RestartCommand?.Args))
{
if (Environment.OSVersion.Platform == PlatformID.Unix)
_creds.RestartCommand = new() { Args = "dotnet", Cmd = "NadekoBot.dll -- {0}" };
_creds.RestartCommand = new()
{
Args = "dotnet",
Cmd = "NadekoBot.dll -- {0}"
};
else
_creds.RestartCommand = new() { Args = "NadekoBot.exe", Cmd = "{0}" };
_creds.RestartCommand = new()
{
Args = "NadekoBot.exe",
Cmd = "{0}"
};
}
if (string.IsNullOrWhiteSpace(_creds.RedisOptions))