-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathLocation.qll
More file actions
36 lines (30 loc) · 1.3 KB
/
Location.qll
File metadata and controls
36 lines (30 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/** Provides classes for working with locations. */
/**
* A location as given by a file, a start line, a start column,
* an end line, and an end column.
*
* For more information about locations see [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
signature class LocationSig {
/** Gets the 1-based line number (inclusive) where this location starts. */
int getStartLine();
/** Gets the 1-based column number (inclusive) where this location starts. */
int getStartColumn();
/** Gets the 1-based line number (inclusive) where this location ends. */
int getEndLine();
/** Gets the 1-based column number (inclusive) where this location ends. */
int getEndColumn();
/** Gets a textual representation of this location. */
bindingset[this]
string toString();
/**
* Holds if this element is at the specified location.
* The location spans column `startColumn` of line `startLine` to
* column `endColumn` of line `endLine` in file `filepath`.
* For more information, see
* [Providing locations in CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
predicate hasLocationInfo(
string filePath, int startLine, int startColumn, int endLine, int endColumn
);
}