mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +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 文件提供完整的项目介绍和使用指南
21 lines
697 B
C#
21 lines
697 B
C#
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);
|
||
} |