github / github/codeql

LGTM.com: Duplicate paths are listed multiple times

Aperta
#8,632 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
false-positive
Lingua principale
CodeQL
Stelle
10.1k
Fork
2.1k
Merge medio
2g 15h
PR unite (30g)
141

Descrizione

**Description of the false positive**

When a `path-problem` query selects multiple source code locations in the message, the paths that are included in that query result get rendered multiple times.

https://lgtm.com/query/1629163930165584076/

When viewing the results the following is rendered, showing that there are 3 source locations as "directory usage here".

![Screen Shot 2022-03-31 at 11 48 45 AM](https://user-images.githubusercontent.com/1323708/161097672-d82ff1aa-b295-4ab3-8be7-59bac1ca3e30.png)

When viewing the paths, the paths are all exactly the same.
![Screen Shot 2022-03-31 at 11 49 05 AM](https://user-images.githubusercontent.com/1323708/161097700-fbe2362f-2fca-46c4-aa18-801f65caa8da.png)

**Proposed Fix**

De-duplicate paths that are 100% equivalent so that only the minimum number of paths are shown.

**Potential Other Bugged Locations**

I haven't checked if this same rendering issue exists on GitHub.com's path-viewer, but I'd imagine that the issue would potentially exist there as well.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.