mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
JS: Factor out some code
This commit is contained in:
@@ -6,10 +6,9 @@ private predicate isOverlay() { databaseMetadata("isOverlay", "true") }
|
||||
|
||||
overlay[local]
|
||||
private string getFileFromEntity(@locatable node) {
|
||||
exists(@location loc, @file file |
|
||||
exists(@location loc |
|
||||
hasLocation(node, loc) and
|
||||
locations_default(loc, file, _, _, _, _) and
|
||||
files(file, result)
|
||||
result = getFileFromLocation(loc)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user