Method signature and method documentation can be out of sync in IntelliSense
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- typescript, vscode
- Domínio
- developer-experience, tooling
Direção de pesquisa
Comece reproduzindo o comportamento com a consulta QL na issue e inspecione o caminho do IntelliSense que combina assinaturas de métodos com QLDoc. Está concluído quando a lista de parâmetros e a documentação exibidas vêm da mesma definição de método quando um override não tem seu próprio QLDoc.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 539
- Forks
- 240
- Merge médio
- 2d 18h
- PRs com merge (30d)
- 37
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/vscode-codeql
-
bug VSCode
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
github/vscode-codeql#4471 · 1 comentário ·
-
bug enhancement VSCode
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
github/vscode-codeql#592 · 2 comentários ·
-
enhancement VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
github/vscode-codeql#4432 · 1 comentário ·
-
bug VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 64/100
github/vscode-codeql#4339 · 1 comentário ·
Todas as issues de github/vscode-codeql
Issues semelhantes
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
Mend: dependency security vulnerability untriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100