File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
rust/ql/lib/ide-contextual-queries Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @name Jump-to-definition links
3+ * @description Generates use-definition pairs that provide the data
4+ * for jump-to-definition in the code viewer.
5+ * @kind definitions
6+ * @id rus/ide-jump-to-definition
7+ * @tags ide-contextual-queries/local-definitions
8+ */
9+
10+ import codeql.IDEContextual
11+ import codeql.rust.elements.Variable
12+ import codeql.rust.elements.Locatable
13+
14+ external string selectedSourceFile ( ) ;
15+
16+ predicate localVariable ( Locatable e , Variable def ) { e = def .getAnAccess ( ) }
17+
18+ from Locatable e , Variable def , string kind
19+ where
20+ e .getLocation ( ) .getFile ( ) = getFileBySourceArchiveName ( selectedSourceFile ( ) ) and
21+ localVariable ( e , def ) and
22+ kind = "local variable"
23+ select e , def , kind
You can’t perform that action at this time.
0 commit comments