Skip to content

[0077] gf fmt --changed-since 支持 C++ 文件#874

Merged
Yuki-Nagori merged 2 commits into
mainfrom
da/0077/changed_since
Jun 25, 2026
Merged

[0077] gf fmt --changed-since 支持 C++ 文件#874
Yuki-Nagori merged 2 commits into
mainfrom
da/0077/changed_since

Conversation

@da-liii

@da-liii da-liii commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • gf fmt --changed-since=REV 支持所有已注册语言(Scheme + C++),不再只支持 Scheme。
  • 未显式指定 -e/--extension 时,--changed-since 默认处理所有语言;显式指定 -e 时按过滤条件执行。
  • tools/fmt/liii/goldfmt-lang.scm 新增 lang-for-name 辅助函数。
  • 移除 tools/fmt/liii/scheme-fmt.scm 中 Scheme 专属的 format-changed-since 死代码。
  • 新增 tools/fmt/tests/liii/goldfmt-changed-since-test.scm 单元测试,覆盖分组逻辑与 Scheme/C++ 端到端格式化。
  • 按项目规范创建 devel/0077.md 任务文档。

Test plan

  • bin/gf test tools/fmt/tests/liii/goldfmt-changed-since-test.scm
  • bin/gf test tools/fmt/tests/ — 27/27 通过
  • bin/gf test — 1471/1471 通过
  • 手动在临时 git 仓库验证 C++ 文件可被 clang-format 正确格式化

🤖 Generated with Claude Code

@Yuki-Nagori Yuki-Nagori left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Yuki-Nagori Yuki-Nagori merged commit e3fdf45 into main Jun 25, 2026
5 checks passed
@Yuki-Nagori Yuki-Nagori deleted the da/0077/changed_since branch June 25, 2026 11:41
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.

2 participants