Skip to content

style: ソース全体を .clang-format に合わせて一括 reformat#76

Merged
thawk105 merged 1 commit into
refine-clang-formatfrom
bulk-clang-format-reformat
May 14, 2026
Merged

style: ソース全体を .clang-format に合わせて一括 reformat#76
thawk105 merged 1 commit into
refine-clang-formatfrom
bulk-clang-format-reformat

Conversation

@thawk105
Copy link
Copy Markdown
Owner

概要

issue #74 への対応。cc/ include/ common/ 配下の C++ ソース (.cc / .hh / .cpp) 全体を .clang-format に合わせて一括 reformat する。

clang-format -i の機械適用のみ。意味的変更はゼロ。手作業での整形・コード変更は一切していない。

PR #75 にスタックしている

このPRは #75「.clang-format リファイン」にスタックしている。base は master ではなく refine-clang-format (#75 のブランチ)。

変更内容

  • 対象確定: git ls-files で git 管理下の .cc / .hh / .cpp のみを対象 (240 ファイル)。third_party/cc/*/build/ 等の build 生成物は除外。
  • 全対象ファイルに clang-format -i を適用 (clang-format 14.0.0、devcontainer 同梱版)。

変更規模

213 files changed, 8998 insertions(+), 9089 deletions(-)

Test plan

  • GCC 13 (CI と同じコンパイラ) で Release フルビルド: cmake -B build-fmt -DCMAKE_BUILD_TYPE=Release -DENABLE_SANITIZER=OFF -DCMAKE_CXX_COMPILER=g++-13 .cmake --build build-fmt -j4
  • 結果: 緑 (exit 0)。全 34 バイナリのビルドに成功。 SortIncludes: false 設定で include 順の破壊も無いことを確認済み。

レビューについて

機械適用 (clang-format -i) のみなので、diff の個別行レビューは不要。ビルドが緑であることと、適用コマンド・対象ファイル選定の正しさを確認すれば十分。

Closes #74

clang-format -i の機械適用のみ、意味的変更なし。
対象は cc/ include/ common/ 配下の .cc/.hh/.cpp (third_party
と build 生成物は除外)。.clang-format は PR #75 のリファイン版。
@thawk105 thawk105 merged commit 2d25102 into refine-clang-format May 14, 2026
2 checks passed
thawk105 added a commit that referenced this pull request May 14, 2026
build とは独立した format.yml を新設し、cc/ include/ common/ 配下の
.cc/.hh/.cpp に clang-format --dry-run --Werror をかける。フォーマット
違反コミットを CI で弾く。

clang-format は devcontainer Dockerfile の dev stage (:latest) のみに
入っているため、このジョブは :latest image を使う (:ci slim には無い)。
対象集合と clang-format バージョン (14) は一括 reformat (#76) と揃える。

Closes #63
thawk105 added a commit that referenced this pull request May 14, 2026
build とは独立した format.yml を新設し、cc/ include/ common/ 配下の
.cc/.hh/.cpp に clang-format --dry-run --Werror をかける。フォーマット
違反コミットを CI で弾く。

clang-format は devcontainer Dockerfile の dev stage (:latest) のみに
入っているため、このジョブは :latest image を使う (:ci slim には無い)。
対象集合と clang-format バージョン (14) は一括 reformat (#76) と揃える。

Closes #63
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