diff --git a/tools/SnakeCaseUpdate/Program.cs b/tools/SnakeCaseUpdate/Program.cs index 80e3114d4922a..ca3ab91427ad3 100644 --- a/tools/SnakeCaseUpdate/Program.cs +++ b/tools/SnakeCaseUpdate/Program.cs @@ -13,7 +13,7 @@ static void UpdateFile(string filePath, string oldName, string newName) return; Console.WriteLine($"Updated {oldName} to {newName} in {filePath}"); - //File.WriteAllText(filePath, updated); + File.WriteAllText(filePath, updated); } string basePath = "../../../../../code"; @@ -36,6 +36,10 @@ static void UpdateFile(string filePath, string oldName, string newName) { var funcName = match.Groups[1].Value; + // Fine... you get the right to live + if (funcName == "Initialize") + continue; + if (!string.IsNullOrEmpty(funcName) && funcName.Length >= minFunctionNameLength) { string snakeCaseName = ToSnakeCase(funcName); @@ -44,14 +48,9 @@ static void UpdateFile(string filePath, string oldName, string newName) Console.WriteLine($"Updating function {funcName} to {snakeCaseName} in {file}"); Console.ResetColor(); - // Update function name in the definition - UpdateFile(file, funcName, snakeCaseName); - // Update function references in the entire codebase foreach (var refFile in files) { - if (refFile == file) continue; // Skip the file being updated - UpdateFile(refFile, funcName, snakeCaseName); } }