Method signature and method documentation can be out of sync in IntelliSense
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- typescript, vscode
- Domaine
- developer-experience, tooling
Piste de recherche
Commencez par reproduire le comportement avec la requête QL de l’issue et examinez le chemin IntelliSense qui combine les signatures de méthodes avec QLDoc. Le travail est terminé lorsque la liste des paramètres et la documentation affichées proviennent de la même définition de méthode lorsqu’un override ne possède pas son propre QLDoc.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 539
- Forks
- 240
- Merge moyen
- 2 j 6 h
- PR mergées (30 j)
- 29
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/vscode-codeql
-
bug VSCode
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
github/vscode-codeql#4471 · 1 commentaire ·
-
bug enhancement VSCode
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
github/vscode-codeql#592 · 2 commentaires ·
-
enhancement VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
github/vscode-codeql#4432 · 1 commentaire ·
-
bug VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 64/100
github/vscode-codeql#4339 · 1 commentaire ·
Toutes les issues de github/vscode-codeql
Issues similaires
-
S: triage
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
snapshot-labs/stamp#666 ·
-
fix(api): prevent leaderboard SSE heartbeat from starting after disconnect during initial load Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
GauravKarakoti/SecureFlow#1070 · 1 commentaire ·
-
feature:Languages/Translations good first issue ready Web
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
digitalfabrik/integreat-app#4394 ·