docs/coding-conventions: commit 前に clang-format を当てる規約を追加#77
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.
概要
変更した C++ ソース (
.cc/.hh/.cpp) は commit 前にclang-formatで整形する、という規約をdocs/coding-conventions_{ja,en}.mdに追加する。「commit/push 前に clang-format を当てる」運用について、自動強制 (hook) は入れず ドキュメントに規約として明記する方針を採った。自動チェックは CI 側 (#63) に委ねる。
追加した内容
## clang-format節を C++ 節の直後に新設:clang-formatで整形するgit clang-formatで staged 差分の範囲だけ整形する — コードベース全体がまだ未整形 (一括 reformat は ソースを.clang-formatに合わせて一括 reformat する (#63 の事前準備) #74 で対応中) なので、ファイル全体を整形するclang-format -iは無関係な大量差分を巻き込む補足: 関連する進行中の作業
.clang-format自体のリファイン (OPEN).clang-formatに合わせて一括 reformat する (#63 の事前準備) #74 / style: ソース全体を .clang-format に合わせて一括 reformat #76 — コードベース全体の一括 reformat (style: ソース全体を .clang-format に合わせて一括 reformat #76 は .clang-format: リポジトリ実態に合わせてリファイン #75 にスタック、OPEN)この PR はそれらと独立してドキュメント規約だけを足すもの。
Test plan
docs/coding-conventions_ja.md(原典) とdocs/coding-conventions_en.md(翻訳) を同一 commit で更新済み (CLAUDE.md ハードルール準拠)。