Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dir name coding rule to snake_case #20

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

sksat
Copy link
Member

@sksat sksat commented Jul 20, 2023

概要

ディレクトリ名のコーディングルールを,これまでの CamelCase から snake_case に変更します

Issue

詳細

この変更のモチベーションは現在の CamelCase のルールを廃止したいからです(snake_case は移行先の最も妥当な選択肢のひとつ).
個別の理由は以下.

  • そもそもルールとして機能していない
    • ディレクトリ名はある種のライブラリ名のようなものやモジュールのようなものを示す手段として使われているが,その文脈において大文字か小文字かによって名前空間を示すことに無理がある
      • Windows ではそもそもパスの大文字・小文字の区別が機能しない
        • これにより,#include で指定しているパスの大文字・小文字が誤っており,Windows 以外でのビルドを破壊しているケースがこれまで多く存在した
    • 外部ライブラリの存在を考慮できておらず,外部ライブラリの追加によってたまに平然と違反が発生している
    • コーディング規約チェックスクリプトがディレクトリ名の命名チェックを行っておらず,強制力が働かない
  • src/src_core, src/src_user という C2A の標準的なディレクトリ構造が堂々とルールに違反している
    • この構造自体も改善の余地は多々あるが,まずはこの構造を標準化したいため,これらを CamelCase にするのではなく,こちらに寄せたい
  • Rust の慣習に寄せたい

影響範囲

  • C2A のすべてのディレクトリ名(C2A user 含む)
  • ただし,移行期間を設けることで,あらゆるディレクトリを一気に rename する必要はないものとする

@sksat sksat added documentation Improvements or additions to documentation enhancement New feature or request priority::high priorityg high labels Jul 20, 2023
@sksat sksat requested a review from meltingrabbit July 20, 2023 16:16
@sksat sksat self-assigned this Jul 20, 2023
Co-authored-by: Ryo Suzumoto <ryo.suzumoto@gmail.com>
@sksat sksat merged commit 46e09fd into develop Jul 21, 2023
24 checks passed
@sksat sksat deleted the feature/change-dir-name-rule branch July 21, 2023 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request priority::high priorityg high
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants