mirror of
https://github.com/github/codeql.git
synced 2026-01-13 14:34:45 +01:00
This enables jump-to-definition and find-references in the VS Code extension, for python source archives.
18 lines
536 B
Plaintext
18 lines
536 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 python/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() = getEncodedFile(selectedSourceFile())
|
|
select use, defn, kind |