github / github/codeql-cli-binaries
Should create warning or error for inherited unusable predicates
- 主要言語
- 言語のデータがありません
- スター
- 1k
- フォーク
- 184
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Currently CodeQL permits writing classes with predicates using database queries, and then subclasses which do not fulfill the requirements for these database types. This renders these inherited predicates unusable and creates pretty cryptic compilation errors when trying to use them. Examples:
- https://github.com/github/codeql/issues/3705
- https://github.com/github/codeql/issues/5320
- https://github.com/github/codeql/issues/7067
It would be good if:
1. The CodeQL compiler would detect such unusuable inherited predicates and cause a compilation error (or at least a warning) for the subclass. This would avoid exposing such subclasses to the user, causing the cryptic compilation errors when they try to use predicates of the subclass.
2. The error message would be clearer, ideally pointing to where the requirement for the database types come from, with predicate call hierarchy if possible. For example for CodeQL Java's `Array.getQualifiedName()` (see https://github.com/github/codeql/issues/7067) it should indicate that `RefType.getPackage()` only supports `@class` and `@interface`.
コントリビューションガイド
調査の方向性
まず、issues #3705、#5320、#7067 にある継承された述語のケースを再現します。これには CodeQL Java's Array.getQualifiedName() と RefType.getPackage() も含まれます。コンパイラーがデータベース型の要件と述語呼び出し階層をどのように処理するかを追跡します。使用できない継承された述語が拒否されるか、元の要件を特定する明確な診断メッセージとともに警告されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100