Repository navigation
style: 按 FormatterConfig 统一格式并加 CI 检查 - #46
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f6786cd1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| set -euo pipefail | ||
| sln=$(git ls-files -- '*.slnx' '*.sln' | head -n 1) | ||
| if [ -z "$sln" ]; then echo "没有解决方案文件"; exit 0; fi | ||
| dotnet format whitespace "$sln" --verify-no-changes |
There was a problem hiding this comment.
Format the whole solution before enabling the formatting gate
The new C# check covers the entire solution, but this commit only reformats src/PluginManager.cs. Other included files still violate the new configuration: for example, host/RegressionChecks.cs:95–97 keeps each if and its embedded statement on one line despite csharp_preserve_single_line_statements = false. Consequently, the new format job will reject this checkout once it reaches this step. The CLI documentation confirms that --verify-no-changes “Terminates with a non zero exit code if any files would have been formatted.” Apply the whitespace formatter to all solution files before enabling this gate, or explicitly limit its initial scope.
Useful? React with 👍 / 👎.
3f6786c to
6b4ad25
Compare
.clang-format 与 .editorconfig 取自 FormatterConfig,逐字节相同。 dotnet format whitespace 收敛了 PluginManager.cs 的既有空白漂移。 CI 的 format job:clang-format(钉 23.1.4)查那一个 probe.c, .editorconfig 的空白规则由空白步骤查,C# 的 csharp_* 规则交给 dotnet format whitespace —— 只有它会执行这些规则。
6b4ad25 to
1eade9c
Compare
接入 FormatterConfig 里的
.clang-format与.editorconfig(均逐字节相同),并把probe.c按新标准重排。CI 的 format job 查三件事:clang-format --dry-run --Werror(钉 23.1.4)、空白(末尾换行、行尾空白)、C# 空白(dotnet format whitespace,只有它会执行csharp_*规则)。