mirror of
https://github.com/github/codeql.git
synced 2026-02-20 08:53:49 +01:00
Merge pull request #19 from github/locations
Fix location handling to match common db schema requirements
This commit is contained in:
@@ -3,13 +3,22 @@
|
||||
* Automatically generated from the tree-sitter grammar; do not edit
|
||||
*/
|
||||
|
||||
class File extends @file {
|
||||
string getAbsolutePath() { files(this, result, _, _, _) }
|
||||
|
||||
string toString() { result = this.getAbsolutePath() }
|
||||
}
|
||||
|
||||
class Location extends @location {
|
||||
string toString() { result = "Location" }
|
||||
|
||||
predicate hasLocationInfo(
|
||||
string filePath, int startLine, int startColumn, int endLine, int endColumn
|
||||
) {
|
||||
location(this, filePath, startLine, startColumn, endLine, endColumn)
|
||||
exists(File f |
|
||||
locations_default(this, f, startLine, startColumn, endLine, endColumn) and
|
||||
filePath = f.getAbsolutePath()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user