Add ability to use contextual queries to find references when already on a reference
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- devtools
Direzione di ricerca
Inizia in extensions/ql-vscode/src/contextual/templateProvider.ts alla riga 70, dove i risultati vengono filtrati in base alla posizione selezionata. Traccia come vengono prodotti i risultati di contextual find-references per dichiarazioni e riferimenti. Il lavoro è completato quando la selezione di un riferimento in un file sorgente Java trova gli stessi riferimenti della selezione della relativa dichiarazione, mentre il comportamento delle dichiarazioni rimane invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm not exactly sure whether this is a feature request or a bug report. Regardless, this is behaviour that is not implemented, but I would expect it to be.
When running the find references contextual query, on a token in a database source file, no references will be found if the token represents a reference itself. References will only be found if the selected token is a declaration. For instance:
int /* 1 */ myMethod() {
/* 2 */ myMethod();
/* 3 */ myMethod();
}
If you place the caret at 2 or 3, no references will be found. If you place the caret at 1 References will be found at 2 and 3. Most other language servers will find references for 2 and 3 regardless of which reference is selected.
The problem is not related to the queries themselves. Rather, it happens here:
https://github.com/aeisenberg/vscode-codeql/blob/353a87de12ca818293aeb3199d057a23a24cc403/extensions/ql-vscode/src/contextual/templateProvider.ts#L70-L70
This function will take all possible results and filter out results that do not contain the selected position. This makes sense when the selected position is the declaration, but it does not make sense if the position is a reference.
- Lingua principale
- TypeScript
- Stelle
- 539
- Fork
- 240
- Merge medio
- 2g 6h
- PR unite (30g)
- 29
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/vscode-codeql
-
bug VSCode
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/vscode-codeql#4471 · 1 commento ·
-
enhancement VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
github/vscode-codeql#4432 · 1 commento ·
-
bug VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
github/vscode-codeql#4339 · 1 commento ·
-
CLI test failure Apertacli-test-failure
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
github/vscode-codeql#4330 · 4 commenti ·
Tutte le issue di github/vscode-codeql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
fullcalendar/fullcalendar#8106 ·