From 096cfec536a7a8f8d951f50c0ffe30f73bcc240e Mon Sep 17 00:00:00 2001 From: ikpil Date: Sat, 29 Apr 2023 12:49:13 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/ConvertVector/Program.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/ConvertVector/Program.cs b/tools/ConvertVector/Program.cs index 35dc635..d7d3a42 100644 --- a/tools/ConvertVector/Program.cs +++ b/tools/ConvertVector/Program.cs @@ -17,7 +17,10 @@ public static class Program { private static List CreateLocations(string path) { - List list = ((IEnumerable)File.ReadAllLines(path)).Where((Func)(line => line.Contains("error CS1061: "))).ToList(); + List list = File.ReadAllLines(path) + .Where(line => line.Contains("error CS1061: ")) + .ToList(); + List locations = new List(); foreach (string input in list) { @@ -62,7 +65,7 @@ public static class Program list[location.Column - 1] = "2]"; string str = string.Join("", (IEnumerable)list); contents[location.Line - 1] = str; - + File.WriteAllLines(location.Path, contents); } @@ -70,6 +73,9 @@ public static class Program { var locations = Program.CreateLocations("../../../../../error.log"); foreach (FileLocation location in locations.DistinctBy(x => x.Path + x.Line)) + { Change(location); + Console.WriteLine($"{location.Path}({location.Line}:{location.Column})"); + } } } \ No newline at end of file