FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/cpp/ql/src/external/DefectFilter.qll at codeql-cli/v2.15.3 · github/codeql · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10k
Code
Issues
998
Pull requests
464
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
cpp
/
ql
/
src
/
external
/
DefectFilter.qll
Copy path
More file actions
More file actions
Latest commit
History
History
History
55 lines (44 loc) · 2.13 KB
Breadcrumbs
codeql
/
cpp
/
ql
/
src
/
external
/
DefectFilter.qll
Copy path
File metadata and controls
55 lines (44 loc) · 2.13 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/** Provides a class for working with defect query results stored in dashboard databases. */
import
cpp
/**
* Holds if `id` in the opaque identifier of a result reported by query `queryPath`,
* such that `message` is the associated message and the location of the result spans
* column `startcolumn` of line `startline` to column `endcolumn` of line `endline`
* in file `filepath`.
*
* For more information, see [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
external
predicate
defectResults
(
int
id
,
string
queryPath
,
string
file
,
int
startline
,
int
startcol
,
int
endline
,
int
endcol
,
string
message
)
;
/**
* A defect query result stored in a dashboard database.
*/
class
DefectResult
extends
int
{
DefectResult
(
)
{
defectResults
(
this
,
_
,
_
,
_
,
_
,
_
,
_
,
_
)
}
/** Gets the path of the query that reported the result. */
string
getQueryPath
(
)
{
defectResults
(
this
,
result
,
_
,
_
,
_
,
_
,
_
,
_
)
}
/** Gets the file in which this query result was reported. */
File
getFile
(
)
{
exists
(
string
path
|
defectResults
(
this
,
_
,
path
,
_
,
_
,
_
,
_
,
_
)
and
result
.
getAbsolutePath
(
)
=
path
)
}
/** Gets the line on which the location of this query result starts. */
int
getStartLine
(
)
{
defectResults
(
this
,
_
,
_
,
result
,
_
,
_
,
_
,
_
)
}
/** Gets the column on which the location of this query result starts. */
int
getStartColumn
(
)
{
defectResults
(
this
,
_
,
_
,
_
,
result
,
_
,
_
,
_
)
}
/** Gets the line on which the location of this query result ends. */
int
getEndLine
(
)
{
defectResults
(
this
,
_
,
_
,
_
,
_
,
result
,
_
,
_
)
}
/** Gets the column on which the location of this query result ends. */
int
getEndColumn
(
)
{
defectResults
(
this
,
_
,
_
,
_
,
_
,
_
,
result
,
_
)
}
/** Gets the message associated with this query result. */
string
getMessage
(
)
{
defectResults
(
this
,
_
,
_
,
_
,
_
,
_
,
_
,
result
)
}
/** Gets the URL corresponding to the location of this query result. */
string
getURL
(
)
{
result
=
"file://"
+
this
.
getFile
(
)
.
getAbsolutePath
(
)
+
":"
+
this
.
getStartLine
(
)
+
":"
+
this
.
getStartColumn
(
)
+
":"
+
this
.
getEndLine
(
)
+
":"
+
this
.
getEndColumn
(
)
}
}
Back
|
FazBrowse Home
|
New Git URL