Method signature and method documentation can be out of sync in IntelliSense
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript, vscode
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi với truy vấn QL trong issue và kiểm tra luồng IntelliSense kết hợp chữ ký phương thức với QLDoc. Công việc được xem là hoàn tất khi danh sách tham số và tài liệu được hiển thị đều đến từ cùng một định nghĩa phương thức trong trường hợp một override không có QLDoc riêng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 539
- Fork
- 240
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 29
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/vscode-codeql
-
bug VSCode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/vscode-codeql#4471 · 1 bình luận ·
-
bug enhancement VSCode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/vscode-codeql#592 · 2 bình luận ·
-
enhancement VSCode
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
github/vscode-codeql#4432 · 1 bình luận ·
-
bug VSCode
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
github/vscode-codeql#4339 · 1 bình luận ·
Tất cả issue của github/vscode-codeql
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vicharanashala/fln#563 ·