diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2024-02-20 20:04:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 20:04:30 +0100 |
commit | 1aab6e96b96af734d1fe5979d30d1a4232cb270d (patch) | |
tree | e617b6c7bd82d7f591b9f2ed487e32c422277888 /modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs | |
parent | 73d502fbc1cb0aa6a904eb292376be6f93ed0ef8 (diff) | |
parent | 000d12d237f147cf3b041adfa9dc8368e4d401c0 (diff) | |
download | redot-engine-1aab6e96b96af734d1fe5979d30d1a4232cb270d.tar.gz |
Merge pull request #87133 from Repiteo/dotnet/enforce-globalization-rules
C#: Enforce globalization code quality rules
Diffstat (limited to 'modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs')
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs index ff15b96c1c..2944dc0d82 100644 --- a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs +++ b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs @@ -1,5 +1,7 @@ using GodotTools.Core; +using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Text; @@ -92,8 +94,8 @@ EndProject"; if (!isFirstProject) projectsDecl += "\n"; - projectsDecl += string.Format(_projectDeclaration, - name, projectInfo.PathRelativeToSolution.Replace("/", "\\"), projectInfo.Guid); + projectsDecl += string.Format(CultureInfo.InvariantCulture, _projectDeclaration, + name, projectInfo.PathRelativeToSolution.Replace("/", "\\", StringComparison.Ordinal), projectInfo.Guid); for (int i = 0; i < projectInfo.Configs.Count; i++) { @@ -105,15 +107,15 @@ EndProject"; projPlatformsCfg += "\n"; } - slnPlatformsCfg += string.Format(_solutionPlatformsConfig, config); - projPlatformsCfg += string.Format(_projectPlatformsConfig, projectInfo.Guid, config); + slnPlatformsCfg += string.Format(CultureInfo.InvariantCulture, _solutionPlatformsConfig, config); + projPlatformsCfg += string.Format(CultureInfo.InvariantCulture, _projectPlatformsConfig, projectInfo.Guid, config); } isFirstProject = false; } string solutionPath = Path.Combine(DirectoryPath, Name + ".sln"); - string content = string.Format(_solutionTemplate, projectsDecl, slnPlatformsCfg, projPlatformsCfg); + string content = string.Format(CultureInfo.InvariantCulture, _solutionTemplate, projectsDecl, slnPlatformsCfg, projPlatformsCfg); File.WriteAllText(solutionPath, content, Encoding.UTF8); // UTF-8 with BOM } |