-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathsteps.ql
More file actions
27 lines (23 loc) · 764 Bytes
/
steps.ql
File metadata and controls
27 lines (23 loc) · 764 Bytes
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
import codeql.rust.elements.internal.ExtractorStep
private class Step instanceof ExtractorStep {
string toString() {
result = super.getAction() + "(" + this.getFilePath() + ")"
or
not super.hasFile() and result = super.getAction()
}
private string getFilePath() {
exists(File file | file = super.getFile() |
exists(file.getRelativePath()) and result = file.getAbsolutePath()
or
not exists(file.getRelativePath()) and result = "/" + file.getBaseName()
)
}
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
super.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
filepath = this.getFilePath()
}
}
from Step step
select step