GwWuYou f3c5840ebe feat(diagnostic): 添加通用诊断描述符并重构诊断系统
- 添加 CommonDiagnostics 类提供通用诊断描述符
- 将诊断相关文件从 logging 目录移动到 diagnostics 目录
- 更新命名空间从 GFramework.SourceGenerators.Common.diagnostics 到 GFramework.SourceGenerators.diagnostics
- 修改诊断ID从 GFC001 到 GF_Common_Class_001
- 移除 GFramework.SourceGenerators.Common 项目引用
- 更新 AnalyzerReleases.Unshipped.md 文件中的诊断规则
- 重构 README.md 文件提供完整的项目介绍和使用指南
2025-12-27 22:51:39 +08:00

21 lines
697 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.CodeAnalysis;
namespace GFramework.SourceGenerators.diagnostics;
/// <summary>
/// 提供诊断描述符的静态类用于GFramework日志生成器的编译时检查
/// </summary>
internal static class LoggerDiagnostics
{
/// <summary>
/// 定义诊断描述符LogAttribute无法生成Logger的错误情况
/// </summary>
public static readonly DiagnosticDescriptor LogAttributeInvalid =
new(
"GF_Logging_001",
"LogAttribute cannot generate Logger",
"LogAttribute on class '{0}' is ineffective: {1}",
"GFramework.Godot.logging",
DiagnosticSeverity.Warning,
true);
}