Graph viewer: edges ordered by wrong attribute
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện truy vấn đồ thị trong issue và xác định mã của trình xem đồ thị áp dụng semmle.order cho các nút và cạnh. Xác nhận rằng các nút gốc vẫn được sắp xếp theo thứ tự giảm dần, trong khi mỗi tập hợp các nút con tuân theo thứ tự tăng dần của vị từ cạnh, sau đó thêm hoặc cập nhật một bài kiểm thử hồi quy nếu dự án có phạm vi kiểm thử cho việc sắp xếp đồ thị.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The graph viewer displays child nodes in the order specified by the semmle.order attribute on the nodes predicate, when it should display them in the order specified by the semmle.order attribute on the edges predicate.
This can be demonstrated with the following graph query:
/**
* @kind graph
* @id foo
*/
query predicate nodes(string node, string attr, string val) {
exists(int i | i = [0 .. 5] and node = i.toString() |
attr = "semmle.label" and val = node
or
attr = "semmle.order" and val = (-i).toString()
)
}
query predicate edges(string a, string b, string attr, string val) {
(
a = "0" and b = ["1", "2"]
or
a = "3" and b = ["4", "5"]
) and
(
attr = "semmle.label" and val = ""
or
attr = "semmle.order" and val = b.toString()
)
}
The nodes predicate specifies that nodes should be ordered in descending order (-i), while the edges predicate specifies that edges should be ordered in ascending order.
In the following screenshot you can see that, while the two subgraphs appear to be ordered correctly, i.e. in descending order of the root node's value (3, then 0), the child nodes also appear left-to-right in descending order (5, 4; 2, 1), which suggests to me that they are also being ordered according to the attribute in the nodes predicate. I would expect them to appear in ascending order.
Version
VS Code: 1.66.2
CodeQL extension: 1.6.5
- 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ự
-
Claiming namespace Londopy Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
EclipseFdn/open-vsx.org#13385 · 1 bình luận ·
-
S: triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
snapshot-labs/stamp#666 ·
-
vangogh
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
knaw-huc/textannoviz#691 ·