FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/ql/src/meta/MetaMetrics.qll at codeql-cli-2.11.3 · github/codeql · GitHub
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10.1k
Code
Issues
1k
Pull requests
468
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
/
python
/
ql
/
src
/
meta
/
MetaMetrics.qll
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (23 loc) · 759 Bytes
Breadcrumbs
codeql
/
python
/
ql
/
src
/
meta
/
MetaMetrics.qll
Copy path
File metadata and controls
26 lines (23 loc) · 759 Bytes
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
/**
* Helpers for generating meta metrics, that is, metrics about the CodeQL analysis and extractor.
*/
import
python
private
import
semmle.python.filters.GeneratedCode
private
import
semmle.python.filters.Tests
/**
* Gets the root folder of the snapshot.
*
* This is selected as the location for project-wide metrics.
*/
Folder
projectRoot
(
)
{
result
.
getRelativePath
(
)
=
""
}
/** A file we ignore because it is a test file, part of a third-party library, or compiled/generated/bundled code. */
class
IgnoredFile
extends
File
{
IgnoredFile
(
)
{
any
(
TestScope
ts
)
.
getLocation
(
)
.
getFile
(
)
=
this
or
this
instanceof
GeneratedFile
or
// outside source root (inspired by `Scope.inSource`)
not
exists
(
this
.
getRelativePath
(
)
)
}
}
Back
|
FazBrowse Home
|
New Git URL