From ab04f0ace786beceb375a9780212ea711bb7082d Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sat, 21 Mar 2026 20:36:32 +0800 Subject: [PATCH] =?UTF-8?q?docs(diagnostic):=20=E6=9B=B4=E6=96=B0=E8=AF=8A?= =?UTF-8?q?=E6=96=AD=E6=B6=88=E6=81=AF=E6=8F=8F=E8=BF=B0=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 Priority 特性错误消息添加句号结尾 - 为接口实现警告消息添加句号结尾 - 为 partial 类要求错误消息添加句号结尾 - 为整数值验证错误消息添加句号结尾 - 为嵌套类限制错误消息添加句号结尾 - 为服务获取建议消息添加句号结尾 - 在测试项目配置中添加警告级别设置 --- GFramework.Core.Tests/GFramework.Core.Tests.csproj | 1 + .../Diagnostics/PriorityDiagnostic.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/GFramework.Core.Tests/GFramework.Core.Tests.csproj b/GFramework.Core.Tests/GFramework.Core.Tests.csproj index b72f92b..0973f95 100644 --- a/GFramework.Core.Tests/GFramework.Core.Tests.csproj +++ b/GFramework.Core.Tests/GFramework.Core.Tests.csproj @@ -7,6 +7,7 @@ enable false true + 0 diff --git a/GFramework.SourceGenerators/Diagnostics/PriorityDiagnostic.cs b/GFramework.SourceGenerators/Diagnostics/PriorityDiagnostic.cs index 8ad8fac..24677ea 100644 --- a/GFramework.SourceGenerators/Diagnostics/PriorityDiagnostic.cs +++ b/GFramework.SourceGenerators/Diagnostics/PriorityDiagnostic.cs @@ -19,7 +19,7 @@ internal static class PriorityDiagnostic category: Category, defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true, - description: "Priority 特性设计用于类级别的优先级标记,不支持其他类型。" + description: "Priority 特性设计用于类级别的优先级标记,不支持其他类型。." ); /// @@ -32,7 +32,7 @@ internal static class PriorityDiagnostic category: Category, defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true, - description: "当类已经手动实现 IPrioritized 接口时,源生成器将跳过代码生成以避免冲突。" + description: "当类已经手动实现 IPrioritized 接口时,源生成器将跳过代码生成以避免冲突。." ); /// @@ -45,7 +45,7 @@ internal static class PriorityDiagnostic category: Category, defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true, - description: "源生成器需要在 partial 类中生成 IPrioritized 接口实现。" + description: "源生成器需要在 partial 类中生成 IPrioritized 接口实现。." ); /// @@ -58,7 +58,7 @@ internal static class PriorityDiagnostic category: Category, defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true, - description: "Priority 特性必须提供一个有效的整数值。" + description: "Priority 特性必须提供一个有效的整数值。." ); /// @@ -71,7 +71,7 @@ internal static class PriorityDiagnostic category: Category, defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true, - description: "Priority 特性仅支持顶层类,不支持嵌套类。请将嵌套类移至命名空间级别。" + description: "Priority 特性仅支持顶层类,不支持嵌套类。请将嵌套类移至命名空间级别。." ); /// @@ -84,6 +84,6 @@ internal static class PriorityDiagnostic category: "GFramework.Usage", defaultSeverity: DiagnosticSeverity.Info, isEnabledByDefault: true, - description: "当获取实现了 IPrioritized 接口的服务时,应使用 GetAllByPriority 方法以确保按优先级排序。" + description: "当获取实现了 IPrioritized 接口的服务时,应使用 GetAllByPriority 方法以确保按优先级排序。." ); } \ No newline at end of file