Skip to content

docs(vitepress): 添加文档站点配置和源码生成器相关文档#192

Closed
GeWuYou wants to merge 1 commit into
mainfrom
docs/vitepress-config-and-source-generators
Closed

docs(vitepress): 添加文档站点配置和源码生成器相关文档#192
GeWuYou wants to merge 1 commit into
mainfrom
docs/vitepress-config-and-source-generators

Conversation

@GeWuYou

@GeWuYou GeWuYou commented Apr 7, 2026

Copy link
Copy Markdown
Owner
  • 新增 .vitepress/config.mts 配置文件,包含本地搜索、多语言导航和侧边栏
  • 添加游戏内容配置系统文档,介绍 YAML + JSON Schema 工作流
  • 添加 BindNodeSignal 生成器文档,说明信号绑定辅助方法生成
  • 添加 ContextAware 生成器文档,介绍上下文感知实现生成
  • 添加 Context Get 注入生成器文档,说明字段注入辅助生成
  • 添加枚举扩展生成器文档,介绍 IsX() 和 IsIn() 方法生成
  • 添加 GetNode 生成器文档,说明 Godot 节点查找辅助生成
  • 添加源码生成器总览文档,包含 Core、Config、Godot 三类生成器
  • 添加日志生成器文档,介绍 ILogger 字段自动生成
  • 添加分析器文档,包含 ContextRegistrationAnalyzer 和 PriorityUsageAnalyzer
  • 添加 Schema Config 生成器文档,说明配置实体和表包装生成

Summary by CodeRabbit

发行说明

  • 文档

    • 新增生成器文档:Schema Config 生成器和分析器的详细指南
    • 简化并重组所有源代码生成器文档,聚焦核心功能说明
    • 更新侧边栏导航,新增源代码生成器相关条目
  • 其他

    • 优化项目导航验证流程

- 新增 .vitepress/config.mts 配置文件,包含本地搜索、多语言导航和侧边栏
- 添加游戏内容配置系统文档,介绍 YAML + JSON Schema 工作流
- 添加 BindNodeSignal 生成器文档,说明信号绑定辅助方法生成
- 添加 ContextAware 生成器文档,介绍上下文感知实现生成
- 添加 Context Get 注入生成器文档,说明字段注入辅助生成
- 添加枚举扩展生成器文档,介绍 IsX() 和 IsIn() 方法生成
- 添加 GetNode 生成器文档,说明 Godot 节点查找辅助生成
- 添加源码生成器总览文档,包含 Core、Config、Godot 三类生成器
- 添加日志生成器文档,介绍 ILogger 字段自动生成
- 添加分析器文档,包含 ContextRegistrationAnalyzer 和 PriorityUsageAnalyzer
- 添加 Schema Config 生成器文档,说明配置实体和表包装生成

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @GeWuYou, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid enum value. Expected 'chill' | 'assertive', received 'balanced' at "reviews.profile"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

本次变更重构了 GFramework 源生成器文档和配置系统文档,整合了分散的生成器说明为简化版本,新增分析器与 Schema 配置生成器专项文档,并添加了文档导航检验脚本。核心是文档内容精简与结构化整理。

Changes

Cohort / File(s) Summary
配置与导航
docs/.vitepress/config.mts
提取搜索配置为共享常量 localSearch,规范化主题配置结构;新增中文源生成器文档导航入口(Schema Config 生成器、分析器)。
游戏配置系统文档
docs/zh-CN/game/config-system.md
重新定位从"AI-First 配表方案"为"YAML + JSON Schema 工作流",删除大量模板与最佳实践内容,精简至核心的 SchemaConfigGenerator/YamlConfigLoader/GameConfigBootstrap 组合,收缩为 MVP 范围。
源生成器综述与索引
docs/zh-CN/source-generators/index.md
从详细的逐生成器说明改写为概览页,新增生成器/分析器清单表,引入生成器使用公共约定与边界说明,删除版本兼容性和性能对比内容。
核心注入与代码生成文档
docs/zh-CN/source-generators/context-aware-generator.md, context-get-generator.md, get-node-generator.md, bind-node-signal-generator.md
统一简化模式:移除大量使用示例、最佳实践、诊断详解;收缩为注入方法签名与基础约束说明,强调手动调用生成方法的职责转移。
特定生成器文档
docs/zh-CN/source-generators/enum-generator.md, logging-generator.md
精简生成行为描述与示例,删除配置选项和高级用法;新增实现细节说明(如配置开关未被读取、默认字段名等)。
新增生成器文档
docs/zh-CN/source-generators/schema-config-generator.md, analyzers.md
新增 Schema 配置生成器完整文档(约束、支持的 schema 子集、生成产物、诊断码)与分析器文档(ContextRegistrationAnalyzerPriorityUsageAnalyzer 的规则与诊断 ID)。
文档导航检验工具
scripts/check-docs-nav.py
新增 Python 脚本,自动验证 docs/zh-CN 中的 Markdown 文件与 config.mts 导航配置的一致性,检测未索引文档与损坏链接。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 源生成器文档焕新姿,
收缩繁冗留精华,
Schema 生成与分析器齐,
导航检验脚本添彩,
文档体系更清晰!✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 标题清晰准确地概括了主要变更内容:添加文档站点配置和源码生成器相关文档,与提供的所有文件变更(配置文件、游戏配置系统文档、多项源码生成器文档、分析器文档和辅助脚本)完全一致。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/vitepress-config-and-source-generators

Comment @coderabbitai help to get the list of available commands and usage tips.

@deepsource-io

deepsource-io Bot commented Apr 7, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in b3e4846...8118baa on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
C# Apr 7, 2026 4:41a.m. Review ↗
Secrets Apr 7, 2026 4:41a.m. Review ↗

@GeWuYou GeWuYou closed this Apr 7, 2026
@GeWuYou GeWuYou deleted the docs/vitepress-config-and-source-generators branch April 7, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant