mathworks / mathworks/MATLAB-Coding-Guidelines
Naming rules for struct/class/bus
まだ誰も着手していません。
- 主要言語
- 言語のデータがありません
- スター
- 139
- フォーク
- 11
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I noticed there isn’t yet an explicit guideline for struct names and, in particular, for struct field names. The only related reference I found, “Defining structs”, includes an example where the struct members use UpperCamelCase. Should these be UpperCamelCase? And if so, should the same convention apply to Simulink.Bus elements?
I’m asking because this can create a mismatch with some Model Advisor naming guidelines. For example, suppose I have a Simulink Inport of type Bus, with elements Signal1 and Signal2, which has been created from a MATLAB struct or class. If I use a Bus Selector to extract Signal1 and feed it into a MATLAB Function block, where the corresponding function parameter is named signal1 (lowerCamelCase, following MATLAB function parameter conventions), Model Advisor will trigger a violation because the bus element name (UpperCamelCase) doesn’t match the block input name (lowerCamelCase).
Is there any recommendations on how to harmonize these conventions?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、既存の「Defining structs」のガイダンスと、issue で参照されている Model Advisor の命名ガイドラインを読んでください。MATLAB の struct および class フィールドと Simulink.Bus の要素に関する規約を比較し、説明されている bus と MATLAB Function の間の命名の不一致を解消する、一貫した推奨事項を文書化してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- matlab
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100