mirror of
https://github.com/github/codeql.git
synced 2026-07-21 11:18:20 +02:00
The two queries in CWE-020 are used for manual evaluation (is my understanding), and the two IDE queries should work based on their tags, and not on the query-id.
20 lines
549 B
Plaintext
20 lines
549 B
Plaintext
/**
|
|
* @name Find-references links
|
|
* @description Generates use-definition pairs that provide the data
|
|
* for find-references in the code viewer.
|
|
* @kind definitions
|
|
* @id py/ide-find-references
|
|
* @tags ide-contextual-queries/local-references
|
|
*/
|
|
|
|
import python
|
|
import DefinitionTracking
|
|
|
|
external string selectedSourceFile();
|
|
|
|
from NiceLocationExpr use, Definition defn, string kind
|
|
where
|
|
defn = definitionOf(use, kind) and
|
|
defn.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile())
|
|
select use, defn, kind
|