This commit is contained in:
ikpil 2023-04-29 12:30:51 +09:00
parent cf7a44afdb
commit b30f3c7666
3 changed files with 84 additions and 0 deletions

View File

@ -35,6 +35,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotRecast.Detour.TileCache.
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotRecast.Recast.Demo", "src\DotRecast.Recast.Demo\DotRecast.Recast.Demo.csproj", "{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotRecast.Recast.Demo", "src\DotRecast.Recast.Demo\DotRecast.Recast.Demo.csproj", "{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{65754308-3C9B-4544-9D7B-F2C16A4E2486}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConvertVector", "tools\ConvertVector\ConvertVector.csproj", "{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -100,6 +104,10 @@ Global
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Debug|Any CPU.Build.0 = Debug|Any CPU {023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.ActiveCfg = Release|Any CPU {023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.Build.0 = Release|Any CPU {023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.Build.0 = Release|Any CPU
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{FFE40BBF-843B-41FA-8504-F4ABD166762E} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD} {FFE40BBF-843B-41FA-8504-F4ABD166762E} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD}
@ -116,5 +124,6 @@ Global
{DEB16B90-CCD4-497E-A2E9-4CC66FD7EF47} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD} {DEB16B90-CCD4-497E-A2E9-4CC66FD7EF47} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD}
{3CAA7306-088E-4373-A406-99755CC2B605} = {A7CB8D8B-70DA-4567-8316-0659FCAE1C73} {3CAA7306-088E-4373-A406-99755CC2B605} = {A7CB8D8B-70DA-4567-8316-0659FCAE1C73}
{023E1E6A-4895-4573-89AE-3D5D8E0B39C8} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD} {023E1E6A-4895-4573-89AE-3D5D8E0B39C8} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD}
{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD} = {65754308-3C9B-4544-9D7B-F2C16A4E2486}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
public static class Program
{
private static List<FileLocation> CreateLocations(string path)
{
List<string> list = ((IEnumerable<string>) File.ReadAllLines(path)).Where<string>((Func<string, bool>) (line => line.Contains("error CS1061: "))).ToList<string>();
List<FileLocation> locations = new List<FileLocation>();
foreach (string input in list)
{
string pattern = "([A-Za-z]:\\\\[^\\\\]+\\\\[^\\\\]+(?:\\\\[^\\\\]+)*\\\\[^\\\\]+\\.cs)\\((\\d+),(\\d+)\\)";
Match match = Regex.Match(input, pattern);
if (match.Success)
{
string str1 = match.Groups[1].Value;
string s1 = match.Groups[2].Value;
string s2 = match.Groups[3].Value;
string str2 = "";
if (input.Contains("'x'에 대한"))
str2 = "x";
if (input.Contains("'y'에 대한"))
str2 = "y";
if (input.Contains("'z'에 대한"))
str2 = "z";
FileLocation fileLocation = new FileLocation()
{
Path = str1,
Line = int.Parse(s1),
Column = int.Parse(s2),
Letter = str2
};
locations.Add(fileLocation);
}
}
return locations;
}
private static void Change(FileLocation location)
{
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>();
list[location.Column - 2] = "[";
if (location.Letter == "x")
list[location.Column - 1] = "0]";
else if (location.Letter == "y")
list[location.Column - 1] = "1]";
else if (location.Letter == "z")
list[location.Column - 1] = "2]";
string str = string.Join("", (IEnumerable<string>) list);
contents[location.Line - 1] = str;
//File.WriteAllLines(location.Path, contents);
}
public static void Main(string[] args)
{
var locations = Program.CreateLocations("../../../../../error.log");
foreach (FileLocation location in locations)
Program.Change(location);
}
}