Method signature and method documentation can be out of sync in IntelliSense
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript, vscode
调研方向
首先使用 issue 中的 QL 查询重现该行为,并检查将方法签名与 QLDoc 结合的 IntelliSense 路径。当 override 没有自己的 QLDoc 时,显示的参数列表和文档来自同一个方法定义,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
This was discussed on Slack where I suggested this could be handled via a compiler warning. Thinking about it some more, however, I think it could equally be handled through a small change in the IDE.
(I wasn't sure whether to classify this as a bug, but it certainly is suprising and potentially confusing behaviour, so I figured "bug" was the most suitable label.)
To Reproduce
Create a query file with the following contents
class SmallNat extends int {
SmallNat() { this in [0 .. 10] }
}
class Super extends int {
Super() { this in [1, 2] }
/** Gets the result of subtracting `bar` from `foo`. */
int subtract(SmallNat foo, SmallNat bar) { result = foo - bar }
}
class Sub extends Super {
Sub() { this = 1 }
override int subtract(SmallNat bar, SmallNat foo) { result = bar - foo }
}
from Sub s, int val
where val = s.subtract(7, 5)
select val
If you hover over the call to s.subtract, the IntelliSense displayed will have the QLDoc associated with Super::subtract, but the parameter list associated with Sub::subtract (and thus incorrectly specify the behaviour of Sub::subtract).
Expected behavior
The parameter list should agree with the QLDoc presented. The most convenient way of achieving this would be to simply reuse the parameter list from Super::subtract when Sub::subtract doesn't supply any QLDoc of its own. In other words, making sure that the parameter list displayed comes from the same method definition as the QLDoc displayed.
- 主要语言
- TypeScript
- 星标
- 539
- 派生
- 240
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 29
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-codeql 的其他 Issue
-
bug VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#4471 · 1 条评论 ·
-
bug enhancement VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#592 · 2 条评论 ·
-
enhancement VSCode
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-codeql#4432 · 1 条评论 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-codeql#4339 · 1 条评论 ·
查看 github/vscode-codeql 的全部 Issue
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
supermomonga/zcode-acp#24 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
growthbook/growthbook#7100 ·
-
triage
难度 1/5 1-3 小时 新手友好度 88/100