codee-com / codee-com/open-catalog
[Fortran] Check for ACTION specifier in OPEN statements
- 主要言語
- Fortran
- スター
- 106
- フォーク
- 12
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The `OPEN` statement allows the `ACTION` specifier which can be `READ`, `WRITE`, OR `READWRITE`, analogous to `INTENT(IN)`, `INTENT(OUT)`, and `INTENT(INOUT)` respectively. The programmer knows how an opened file is to be used, and using a file connection in a way contrary to the `ACTION` will produce a runtime error. Adding a check that each `OPEN` includes an `ACTION` could therefore help reveal bugs where a file that is intended to be read-only is written to. This would improve code correctness and security.
It would be even better not to rely on the runtime error, and instead check that no `WRITE` statement is applied to a unit opened as `ACTION='READ'` and vice versa.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、Analyzer における Fortran OPEN、ACTION、WRITE 文の処理箇所を特定します。最初の変更で ACTION を必須にするのか、READ/WRITE の整合性を強制するのか、それとも両方にするのかを明確にし、その後、サポートされている各 ACTION 値と、それによって生じる診断のテストを定義します。選択したチェックがテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- fortran
- 領域
- security
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100