Files
codeql/csharp/ql/src/localDefinitions.ql
Nick Rolfe 1e1eb7ee33 Replace getEncodedFile with shared getFileBySourceArchiveName predicate
While also making it work with paths for databases created on Windows.
2020-11-10 13:55:27 +00:00

20 lines
578 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 cs/ide-jump-to-definition
* @tags ide-contextual-queries/local-definitions
*/
import definitions
external string selectedSourceFile();
from Use e, Declaration def, string kind, string filepath
where
def = definitionOf(e, kind) and
e.hasLocationInfo(filepath, _, _, _, _) and
filepath = getFileBySourceArchiveName(selectedSourceFile()).getAbsolutePath()
select e, def, kind