FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/javascript/ql/src/meta/MetaMetrics.qll at codeql-cli/v2.27.1 · github/codeql · GitHub
github
codeql
Repository navigation
Code
Issues
1k
(1k)
Pull requests
487
(487)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
javascript
/
ql
/
src
/
meta
/
MetaMetrics.qll
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (29 loc) · 969 Bytes
Breadcrumbs
codeql
/
javascript
/
ql
/
src
/
meta
/
MetaMetrics.qll
Copy path
File metadata and controls
32 lines (29 loc) · 969 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
27
28
29
30
31
32
/**
* Helpers to generating meta metrics, that is, metrics about the CodeQL analysis and extractor.
*/
private
import
javascript
private
import
semmle.javascript.dependencies.Dependencies
private
import
semmle.javascript.dependencies.FrameworkLibraries
private
import
semmle.javascript.frameworks.Testing
/**
* 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 or compiled/generated/bundled code. */
class
IgnoredFile
extends
File
{
IgnoredFile
(
)
{
any
(
Test
t
)
.
getFile
(
)
=
this
or
this
.
getRelativePath
(
)
.
regexpMatch
(
"(?i).*/test(case)?s?/.*"
)
or
this
.
getBaseName
(
)
.
regexpMatch
(
"(?i)(.*[._\\-]|^)(min|bundle|concat|spec|tests?)\\.[a-zA-Z]+"
)
or
exists
(
TopLevel
tl
|
tl
.
getFile
(
)
=
this
|
tl
.
isExterns
(
)
or
tl
instanceof
FrameworkLibraryInstance
)
}
}
Back
|
FazBrowse Home
|
New Git URL