From bd2a73d161cb67940a2f6114922022969bcfc85f Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Tue, 9 Sep 2025 17:34:40 +0100 Subject: [PATCH 1/2] Fix warning `CS8981` Fix warning [CS8981: The type name only contains lower-cased ascii characters](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/warning-waves#:~:text=CS8981%20%2D%20The%20type%20name%20only%20contains%20lower%2Dcased%20ascii%20characters). This warning is a warning wave 7 diagnostic added in C# 11. --- src/jit-diff/diff.cs | 6 +++--- src/jit-diff/install.cs | 8 ++++++-- src/jit-diff/jit-diff.cs | 6 +++++- src/jit-diff/uninstall.cs | 6 +++++- src/jit-format/jit-format.cs | 5 ++--- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/jit-diff/diff.cs b/src/jit-diff/diff.cs index e9cd749c..ab451840 100644 --- a/src/jit-diff/diff.cs +++ b/src/jit-diff/diff.cs @@ -30,7 +30,7 @@ public ProgressBar() m_start = DateTime.Now; } - private static void StartTasks(List assemblyWorkList, jitdiff.Config config, List tasks) + private static void StartTasks(List assemblyWorkList, JitDiff.Config config, List tasks) { int counter = 0; @@ -72,7 +72,7 @@ private static void StartTasks(List assemblyWorkList, jitdiff.Conf }); } - public void AwaitTasksAndShowProgress(List assemblyWorkList, jitdiff.Config config, + public void AwaitTasksAndShowProgress(List assemblyWorkList, JitDiff.Config config, List tasks, bool isFinalAwait) { StartTasks(assemblyWorkList, config, tasks); @@ -130,7 +130,7 @@ public void AwaitTasksAndShowProgress(List assemblyWorkList, jitdi } } - public partial class jitdiff + public partial class JitDiff { public class DasmResult { diff --git a/src/jit-diff/install.cs b/src/jit-diff/install.cs index fc154ff5..d6687a8a 100644 --- a/src/jit-diff/install.cs +++ b/src/jit-diff/install.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +// +// jit-diff +// + using System; using System.Collections.Generic; using System.CommandLine; @@ -18,7 +22,7 @@ namespace ManagedCodeGen { - public partial class jitdiff + public partial class JitDiff { public static int InstallCommand(Config config) { @@ -163,7 +167,7 @@ public static int InstallCommand(Config config) // Overwrite current config.json with new data. using (var sw = File.CreateText(configFilePath)) { - var json = JsonSerializer.Serialize (jObj, new JsonSerializerOptions { WriteIndented = true }); + var json = JsonSerializer.Serialize(jObj, new JsonSerializerOptions { WriteIndented = true }); sw.Write(json); } diff --git a/src/jit-diff/jit-diff.cs b/src/jit-diff/jit-diff.cs index 9430d637..49325a64 100755 --- a/src/jit-diff/jit-diff.cs +++ b/src/jit-diff/jit-diff.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +// +// jit-diff +// + using System; using System.Collections.Generic; using System.CommandLine; @@ -25,7 +29,7 @@ public class AssemblyInfo public string OutputPath { get; set; } } - public partial class jitdiff + public partial class JitDiff { // Supported commands. List to view information from the CI system, and Copy to download artifacts. public enum Commands diff --git a/src/jit-diff/uninstall.cs b/src/jit-diff/uninstall.cs index 0ad793c8..b0ef54ae 100644 --- a/src/jit-diff/uninstall.cs +++ b/src/jit-diff/uninstall.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +// +// jit-diff +// + using System; using System.CommandLine; using System.IO; @@ -11,7 +15,7 @@ namespace ManagedCodeGen { - public partial class jitdiff + public partial class JitDiff { public static int UninstallCommand(Config config) { diff --git a/src/jit-format/jit-format.cs b/src/jit-format/jit-format.cs index 104017e8..a91ee16d 100644 --- a/src/jit-format/jit-format.cs +++ b/src/jit-format/jit-format.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -/////////////////////////////////////////////////////////////////////////////// // -// jit-format - +// jit-format // using System; @@ -22,7 +21,7 @@ namespace ManagedCodeGen { - public class jitformat + public class JitFormat { // Define options to be parsed public class Config From 4168081dd32415db617a608639e5cfb228b6b2bf Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Sun, 21 Sep 2025 01:04:19 +0100 Subject: [PATCH 2/2] revert and fix in the most minimal way --- src/jit-diff/diff.cs | 6 +++--- src/jit-diff/install.cs | 8 ++------ src/jit-diff/jit-diff.cs | 6 +----- src/jit-diff/uninstall.cs | 6 +----- src/jit-format/jit-format.cs | 5 +++-- 5 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/jit-diff/diff.cs b/src/jit-diff/diff.cs index ab451840..af3f86d9 100644 --- a/src/jit-diff/diff.cs +++ b/src/jit-diff/diff.cs @@ -30,7 +30,7 @@ public ProgressBar() m_start = DateTime.Now; } - private static void StartTasks(List assemblyWorkList, JitDiff.Config config, List tasks) + private static void StartTasks(List assemblyWorkList, jitdiff.Config config, List tasks) { int counter = 0; @@ -72,7 +72,7 @@ private static void StartTasks(List assemblyWorkList, JitDiff.Conf }); } - public void AwaitTasksAndShowProgress(List assemblyWorkList, JitDiff.Config config, + public void AwaitTasksAndShowProgress(List assemblyWorkList, jitdiff.Config config, List tasks, bool isFinalAwait) { StartTasks(assemblyWorkList, config, tasks); @@ -130,7 +130,7 @@ public void AwaitTasksAndShowProgress(List assemblyWorkList, JitDi } } - public partial class JitDiff + public partial class @jitdiff { public class DasmResult { diff --git a/src/jit-diff/install.cs b/src/jit-diff/install.cs index d6687a8a..6eb96870 100644 --- a/src/jit-diff/install.cs +++ b/src/jit-diff/install.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// jit-diff -// - using System; using System.Collections.Generic; using System.CommandLine; @@ -22,7 +18,7 @@ namespace ManagedCodeGen { - public partial class JitDiff + public partial class @jitdiff { public static int InstallCommand(Config config) { @@ -167,7 +163,7 @@ public static int InstallCommand(Config config) // Overwrite current config.json with new data. using (var sw = File.CreateText(configFilePath)) { - var json = JsonSerializer.Serialize(jObj, new JsonSerializerOptions { WriteIndented = true }); + var json = JsonSerializer.Serialize (jObj, new JsonSerializerOptions { WriteIndented = true }); sw.Write(json); } diff --git a/src/jit-diff/jit-diff.cs b/src/jit-diff/jit-diff.cs index 49325a64..39b2707c 100755 --- a/src/jit-diff/jit-diff.cs +++ b/src/jit-diff/jit-diff.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// jit-diff -// - using System; using System.Collections.Generic; using System.CommandLine; @@ -29,7 +25,7 @@ public class AssemblyInfo public string OutputPath { get; set; } } - public partial class JitDiff + public partial class @jitdiff { // Supported commands. List to view information from the CI system, and Copy to download artifacts. public enum Commands diff --git a/src/jit-diff/uninstall.cs b/src/jit-diff/uninstall.cs index b0ef54ae..1f084d4a 100644 --- a/src/jit-diff/uninstall.cs +++ b/src/jit-diff/uninstall.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// -// jit-diff -// - using System; using System.CommandLine; using System.IO; @@ -15,7 +11,7 @@ namespace ManagedCodeGen { - public partial class JitDiff + public partial class @jitdiff { public static int UninstallCommand(Config config) { diff --git a/src/jit-format/jit-format.cs b/src/jit-format/jit-format.cs index a91ee16d..8dee3053 100644 --- a/src/jit-format/jit-format.cs +++ b/src/jit-format/jit-format.cs @@ -2,8 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +/////////////////////////////////////////////////////////////////////////////// // -// jit-format +// jit-format - // using System; @@ -21,7 +22,7 @@ namespace ManagedCodeGen { - public class JitFormat + public class @jitformat { // Define options to be parsed public class Config