GwWuYou 929ea6b2d6 refactor(godot): 重构源代码生成器依赖结构
- 将CommonDiagnostics移至GFramework.SourceGenerators.Common模块
- 添加PathContests常量类统一管理路径常量
- 更新GodotLoggerGenerator使用新的路径常量和诊断引用
- 修改项目引用以包含GFramework.SourceGenerators.Common依赖
- 更新NuGet包配置以包含Common模块的DLL和XML文档
- 在解决方案文件中添加GFramework.SourceGenerators.Common项目引用
- 为Common模块创建Analyzer发布跟踪文件
2025-12-28 08:54:52 +08:00

29 lines
849 B
C#

using Microsoft.CodeAnalysis;
namespace GFramework.SourceGenerators.Common.diagnostics;
/// <summary>
/// 提供通用诊断描述符的静态类
/// </summary>
public static class CommonDiagnostics
{
/// <summary>
/// 定义类必须为partial的诊断描述符
/// </summary>
/// <remarks>
/// 诊断ID: GF001
/// 诊断消息: "Class '{0}' must be declared partial for code generation"
/// 分类: GFramework.Common
/// 严重性: Error
/// 是否启用: true
/// </remarks>
public static readonly DiagnosticDescriptor ClassMustBePartial =
new(
"GF_Common_Class_001",
"Class must be partial",
"Class '{0}' must be declared partial for code generation",
"GFramework.Common",
DiagnosticSeverity.Error,
true
);
}