Graph viewer: edges ordered by wrong attribute
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Inizia riproducendo la query del grafo nell'issue e individua il codice del visualizzatore del grafo che applica semmle.order ai nodi e agli archi. Verifica che i nodi radice rimangano ordinati in modo decrescente, mentre ogni insieme di nodi figli segua l'ordine crescente del predicato degli archi, quindi aggiungi o aggiorna un test di regressione se il progetto dispone di una copertura per l'ordinamento dei grafi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The graph viewer displays child nodes in the order specified by the semmle.order attribute on the nodes predicate, when it should display them in the order specified by the semmle.order attribute on the edges predicate.
This can be demonstrated with the following graph query:
/**
* @kind graph
* @id foo
*/
query predicate nodes(string node, string attr, string val) {
exists(int i | i = [0 .. 5] and node = i.toString() |
attr = "semmle.label" and val = node
or
attr = "semmle.order" and val = (-i).toString()
)
}
query predicate edges(string a, string b, string attr, string val) {
(
a = "0" and b = ["1", "2"]
or
a = "3" and b = ["4", "5"]
) and
(
attr = "semmle.label" and val = ""
or
attr = "semmle.order" and val = b.toString()
)
}
The nodes predicate specifies that nodes should be ordered in descending order (-i), while the edges predicate specifies that edges should be ordered in ascending order.
In the following screenshot you can see that, while the two subgraphs appear to be ordered correctly, i.e. in descending order of the root node's value (3, then 0), the child nodes also appear left-to-right in descending order (5, 4; 2, 1), which suggests to me that they are also being ordered according to the attribute in the nodes predicate. I would expect them to appear in ascending order.
Version
VS Code: 1.66.2
CodeQL extension: 1.6.5
- 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 ·
-
bug enhancement VSCode
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/vscode-codeql#592 · 2 commenti ·
-
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 ·
Tutte le issue di github/vscode-codeql
Issue simili
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Apertaclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
supermomonga/zcode-acp#24 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
growthbook/growthbook#7100 ·
-
triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100