fix compiler complaints

This commit is contained in:
13xforever 2019-05-06 18:15:09 +05:00
parent 617e12ed87
commit 81ad3865dc
3 changed files with 8 additions and 9 deletions

View File

@ -48,7 +48,7 @@ namespace CompatBot.Utils.ResultFormatters
CheckP5Settings(serial, items, notes);
CheckAsurasWrathSettings(serial, items, notes);
CheckJojoSettings(serial, items, notes);
CheckSimpsonsSettings(serial, items, notes);
CheckSimpsonsSettings(serial, notes);
CheckNierSettings(serial, items, notes);
CheckScottPilgrimSettings(serial, items, notes);
}
@ -213,7 +213,7 @@ namespace CompatBot.Utils.ResultFormatters
notes.Add(" If you experience audio issues, disable `Audio Buffering` or Pause/Unpause emulation");
}
private static void CheckSimpsonsSettings(string serial, NameValueCollection items, List<string> notes)
private static void CheckSimpsonsSettings(string serial, List<string> notes)
{
if (serial == "BLES00142" || serial == "BLUS30065")
{

View File

@ -266,7 +266,7 @@ namespace CompatBot.Utils.ResultFormatters
private static async Task<UpdateInfo> CheckForUpdateAsync(NameValueCollection items)
{
if (!(items["build_and_specs"] is string buildAndSpecs))
if (string.IsNullOrEmpty(items["build_and_specs"]))
return null;
var currentBuildCommit = items["build_commit"];

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
@ -14,7 +13,7 @@ namespace Tests
public class ZalgoTests
{
[Test, Explicit("Requires external data")]
public async Task ZalgoAuditTest()
public async Task ZalgoAuditTestAsync()
{
var samplePath = @"C:/Users/13xforever/Downloads/names.txt";
var resultPath = Path.Combine(Path.GetDirectoryName(samplePath), "zalgo.txt");
@ -27,12 +26,12 @@ namespace Tests
var user = UserInfo.Parse(line);
var isZalgo = UsernameZalgoMonitor.NeedsRename(user.DisplayName);
if (isZalgo)
w.WriteLine(user.DisplayName);
await w.WriteLineAsync(user.DisplayName).ConfigureAwait(false);
}
}
[Test, Explicit("Requires external data")]
public async Task RoleSortTest()
public async Task RoleSortTestAsync()
{
var samplePath = @"C:/Users/13xforever/Downloads/names.txt";
var resultPath = Path.Combine(Path.GetDirectoryName(samplePath), "role_count.txt");
@ -47,8 +46,8 @@ namespace Tests
var roleCount = user.Roles?.Length ?? 0;
stats[roleCount]++;
w.Write(roleCount);
w.Write('\t');
w.WriteLine(user.DisplayName);
await w.WriteAsync('\t').ConfigureAwait(false);
await w.WriteLineAsync(user.DisplayName).ConfigureAwait(false);
}
for (var i = 0; i < stats.Length && stats[i] > 0; i++)