forked from mirror/DotRecast
test
This commit is contained in:
parent
d108c56a29
commit
b714e5b0f7
|
@ -55,7 +55,15 @@ public static class Program
|
||||||
private static void Change(FileLocation location)
|
private static void Change(FileLocation location)
|
||||||
{
|
{
|
||||||
string[] contents = File.ReadAllLines(location.Path);
|
string[] contents = File.ReadAllLines(location.Path);
|
||||||
List<string> list = ((IEnumerable<char>)contents[location.Line - 1].ToCharArray()).Select<char, string>((Func<char, string>)(x => x.ToString() ?? "")).ToList<string>();
|
var line = contents[location.Line - 1];
|
||||||
|
List<string> list = line.ToCharArray()
|
||||||
|
.Select((x => x.ToString() ?? ""))
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
// 다르면 하지 말것
|
||||||
|
if ("." != list[location.Column - 2] || location.Letter != list[location.Column - 1])
|
||||||
|
return;
|
||||||
|
|
||||||
list[location.Column - 2] = "[";
|
list[location.Column - 2] = "[";
|
||||||
if (location.Letter == "x")
|
if (location.Letter == "x")
|
||||||
list[location.Column - 1] = "0]";
|
list[location.Column - 1] = "0]";
|
||||||
|
@ -71,8 +79,14 @@ public static class Program
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
var locations = Program.CreateLocations("../../../../../error.log");
|
var locations = CreateLocations("../../../../../error.log");
|
||||||
foreach (FileLocation location in locations.DistinctBy(x => x.Path + x.Line))
|
var distinctLocations = locations.DistinctBy(x => x.Path + x.Line).ToList();
|
||||||
|
if (0 >= distinctLocations.Count)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (FileLocation location in distinctLocations)
|
||||||
{
|
{
|
||||||
Change(location);
|
Change(location);
|
||||||
Console.WriteLine($"{location.Path}({location.Line}:{location.Column})");
|
Console.WriteLine($"{location.Path}({location.Line}:{location.Column})");
|
||||||
|
|
Loading…
Reference in New Issue