github / github/codeql-cli-binaries
Should create warning or error for inherited unusable predicates
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 1k
- Forks
- 184
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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`.
Guía de contribución
Línea de trabajo
Comienza reproduciendo los casos de predicados heredados de las issues #3705, #5320 y #7067, incluidos CodeQL Java's Array.getQualifiedName() y RefType.getPackage(). Traza cómo el compilador gestiona los requisitos de tipo de base de datos y la jerarquía de llamadas de predicados. Se considera terminado cuando los predicados heredados inutilizables se rechazan o generan una advertencia con un diagnóstico claro que identifique el requisito de origen.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Área
- compilers
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100