github / github/codeql-cli-binaries

Suggestion: `boolean(<formula>)` expression

オープン
#56 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
CLI enhancement
主要言語
言語のデータがありません
スター
1k
フォーク
184
PR マージ指標
30日以内にマージされた PR はありません

説明

Especially when debugging queries it can often be interesting to know whether a predicate (or a relation) holds or not. However, you can only use expressions in result sets, requiring you to manually get a `boolean` value for the predicate in question, e.g.:
```ql
import java

from Method m, boolean isStatic
where
if m.isStatic() then isStatic = true
else isStatic = false
select m, isStatic
```

Therefore it might be useful to introduce a `boolean()` expression. If the formula holds, then the result is `true`, otherwise `false`:
```ql
import java

from Method m
select m, boolean(m.isStatic())
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Issue にはファイル、テスト、実装のエントリーポイントが記載されていません。まずクエリ式の実装と既存の結果セット式のテストを見つけ、次にそれらの述語の扱いを Issue の例と比較してください。boolean() 式が true または false に評価され、テストでカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

領域
devtools
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。