mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
This will ensure that python projects can use jump to ref/def in vscode when the core libraries are not installed.
21 lines
610 B
Plaintext
21 lines
610 B
Plaintext
/**
|
|
* @name Jump-to-definition links
|
|
* @description Generates use-definition pairs that provide the data
|
|
* for jump-to-definition in the code viewer.
|
|
* @kind definitions
|
|
* @id py/ide-jump-to-definition
|
|
* @tags ide-contextual-queries/local-definitions
|
|
*/
|
|
|
|
import python
|
|
import analysis.DefinitionTracking
|
|
|
|
external string selectedSourceFile();
|
|
|
|
from NiceLocationExpr use, Definition defn, string kind, string f
|
|
where
|
|
defn = definitionOf(use, kind) and
|
|
use.hasLocationInfo(f, _, _, _, _) and
|
|
getFileBySourceArchiveName(selectedSourceFile()).getAbsolutePath() = f
|
|
select use, defn, kind
|