github / github/codeql-cli-binaries

Should create warning or error for inherited unusable predicates

Đang mở
#93 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
CLI
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
1k
Fork
184
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Currently CodeQL permits writing classes with predicates using database queries, and then subclasses which do not fulfill the requirements for these database types. This renders these inherited predicates unusable and creates pretty cryptic compilation errors when trying to use them. Examples:
- https://github.com/github/codeql/issues/3705
- https://github.com/github/codeql/issues/5320
- https://github.com/github/codeql/issues/7067

It would be good if:
1. The CodeQL compiler would detect such unusuable inherited predicates and cause a compilation error (or at least a warning) for the subclass. This would avoid exposing such subclasses to the user, causing the cryptic compilation errors when they try to use predicates of the subclass.
2. The error message would be clearer, ideally pointing to where the requirement for the database types come from, with predicate call hierarchy if possible. For example for CodeQL Java's `Array.getQualifiedName()` (see https://github.com/github/codeql/issues/7067) it should indicate that `RefType.getPackage()` only supports `@class` and `@interface`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện các trường hợp predicate được kế thừa trong các issue #3705, #5320 và #7067, bao gồm CodeQL Java's Array.getQualifiedName() và RefType.getPackage(). Theo dõi cách trình biên dịch xử lý các yêu cầu về kiểu cơ sở dữ liệu và hệ phân cấp lời gọi predicate. Công việc được hoàn tất khi các predicate được kế thừa nhưng không thể sử dụng bị từ chối hoặc bị cảnh báo bằng một chẩn đoán rõ ràng xác định yêu cầu ban đầu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
compilers
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.