[0183] 修复 gf fmt 目录格式化并支持单目录和单文件的 --check - #1029
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
修复
gf fmt <dir>目录格式化误扫描全仓库的问题,并支持gf fmt --check针对单目录与单文件的检查。改动点
scheme-fmt.scm、cpp-fmt.scm、stem-fmt.scm):无论cfg是否存在,均严格以传入的dir作为文件收集与递归处理根目录,不再无视dir扫描全仓库。goldfmt.scm):新增dispatch-check-directory与dispatch-check-file,存在未格式化文件时退出码 1,全部格式化时退出码 0。tools/fmt/tests/liii/goldfmt-dir-test.scm):基于(liii subprocess)覆盖单目录隔离格式化及单目录/单文件--check的端到端测试。devel/0183.md。