mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
This will ensure that python projects can use jump to ref/def in vscode when the core libraries are not installed.
20 lines
558 B
Plaintext
20 lines
558 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 analysis.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
|