mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
With this change, users are now able to run View AST command in vscode within vscode workspaces that do not include the core libraries. The relevant core library only needs to be installed in the package cache.
21 lines
563 B
Plaintext
21 lines
563 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 rb/ide-find-references
|
|
* @tags ide-contextual-queries/local-references
|
|
*/
|
|
|
|
import codeql.IDEContextual
|
|
import codeql.ruby.AST
|
|
|
|
external string selectedSourceFile();
|
|
|
|
from AstNode e, Variable def, string kind
|
|
where
|
|
e = def.getAnAccess() and
|
|
kind = "local variable" and
|
|
def.getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile())
|
|
select e, def, kind
|