mirror of
https://github.com/github/codeql.git
synced 2026-01-31 07:12:57 +01: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.
21 lines
601 B
Plaintext
21 lines
601 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 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
|