mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 03:04:29 +08:00
- 添加 CommonDiagnostics 类提供通用诊断描述符 - 将诊断相关文件从 logging 目录移动到 diagnostics 目录 - 更新命名空间从 GFramework.SourceGenerators.Common.diagnostics 到 GFramework.SourceGenerators.diagnostics - 修改诊断ID从 GFC001 到 GF_Common_Class_001 - 移除 GFramework.SourceGenerators.Common 项目引用 - 更新 AnalyzerReleases.Unshipped.md 文件中的诊断规则 - 重构 README.md 文件提供完整的项目介绍和使用指南
25 lines
837 B
C#
25 lines
837 B
C#
using Microsoft.CodeAnalysis;
|
||
|
||
namespace GFramework.Godot.SourceGenerators.diagnostics;
|
||
|
||
/// <summary>
|
||
/// 提供诊断描述符的静态类,用于GFramework日志生成器的编译时检查
|
||
/// </summary>
|
||
internal static class GodotLoggerDiagnostics
|
||
{
|
||
/// <summary>
|
||
/// 诊断描述符:标识GodotLogAttribute无法在指定类上生成Logger
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// ID: GFW_LOG001
|
||
/// 严重性: Warning
|
||
/// 分类: GFramework.Godot.Logging
|
||
/// </remarks>
|
||
public static readonly DiagnosticDescriptor LogAttributeInvalid = new(
|
||
"GF_Godot_Logging_001",
|
||
"GodotLogAttribute cannot generate Logger",
|
||
"GodotLogAttribute on class '{0}' is ineffective: {1}",
|
||
"GFramework.Godot.Logging",
|
||
DiagnosticSeverity.Warning,
|
||
true);
|
||
} |