using Microsoft.CodeAnalysis; namespace GFramework.Godot.SourceGenerators.logging; /// /// 提供诊断描述符的静态类,用于GFramework日志生成器的编译时检查 /// internal static class GodotLoggerDiagnostics { /// /// 诊断描述符:标识使用[GodotLog]特性的类必须声明为partial /// /// /// ID: GFLOG001 /// 严重性: Error /// 分类: GFramework.Godot.Logging /// public static readonly DiagnosticDescriptor MustBePartial = new( "GFLOG001", "Class must be partial", "Class '{0}' must be declared as partial to use [GodotLog]", "GFramework.Godot.Logging", DiagnosticSeverity.Error, true ); /// /// 诊断描述符:标识GodotLogAttribute无法在指定类上生成Logger /// /// /// ID: GFW_LOG001 /// 严重性: Warning /// 分类: GFramework.Godot.Logging /// public static readonly DiagnosticDescriptor LogAttributeInvalid = new( "GFW_LOG001", "GodotLogAttribute cannot generate Logger", "GodotLogAttribute on class '{0}' is ineffective: {1}", "GFramework.Godot.Logging", DiagnosticSeverity.Warning, true); }