github / github/codeql-cli-binaries
Suggestion: `boolean(<formula>)` expression
- 主要語言
- 沒有語言資料
- 星號
- 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())
```
貢獻指南
研究方向
The issue names no files, tests, or implementation entry points. Start by locating the query-expression implementation and existing result-set expression tests, then compare their handling of predicates with the examples in the issue. Done means a boolean() expression evaluates to true or false and is covered by tests.
由索引模型根據 Issue 內容生成。
評估
- 領域
- devtools
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100