mirror of
https://github.com/github/codeql.git
synced 2026-04-24 08:15:14 +02:00
Rust: use check_diagnostics improvements
This commit is contained in:
@@ -17,10 +17,12 @@ def manifests(cwd):
|
||||
@pytest.fixture
|
||||
def rust_check_diagnostics(check_diagnostics):
|
||||
check_diagnostics.replacements += [
|
||||
(r'"ms"\s*:\s*[0-9]+', '"ms": "__REDACTED__"'),
|
||||
(r'"pretty"\s*:\s*"[^"]*"', '"pretty": "__REDACTED__"'),
|
||||
("Cargo.toml|rust-project.json", "<manifest-file>"),
|
||||
]
|
||||
check_diagnostics.skip += [
|
||||
"attributes.steps", # the order of the steps is not stable
|
||||
check_diagnostics.redact += [
|
||||
"attributes.summary.durations.*.ms",
|
||||
"attributes.summary.durations.*.pretty",
|
||||
"attributes.steps.ms",
|
||||
]
|
||||
check_diagnostics.sort = True # the order of the steps is not stable
|
||||
return check_diagnostics
|
||||
|
||||
@@ -1,28 +1,107 @@
|
||||
{
|
||||
"attributes": {
|
||||
"summary": {
|
||||
"numberOfFiles": 4,
|
||||
"numberOfManifests": 1,
|
||||
"totalDuration": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
"steps": [
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/src/directory_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
"totalExtractDuration": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/src/directory_module/nested_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
"totalFetchFileDuration": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/src/directory_module/not_loaded.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
"totalLoadDuration": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/src/file_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
"totalParseDuration": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadManifest",
|
||||
"file": "<test-root-directory>/<manifest-file>",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/src/directory_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/src/directory_module/nested_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/src/file_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/src/directory_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/src/directory_module/nested_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/src/directory_module/not_loaded.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/src/file_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"durations": {
|
||||
"extract": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
},
|
||||
"loadManifest": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
},
|
||||
"loadSource": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
},
|
||||
"parse": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
},
|
||||
"total": {
|
||||
"ms": "__REDACTED__",
|
||||
"pretty": "__REDACTED__"
|
||||
}
|
||||
},
|
||||
"numberOfFiles": 5,
|
||||
"numberOfManifests": 1
|
||||
}
|
||||
},
|
||||
"severity": "note",
|
||||
|
||||
@@ -1,5 +1,77 @@
|
||||
{
|
||||
"attributes": {
|
||||
"steps": [
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/exe/src/a_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/exe/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/lib/src/a_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/lib/src/lib.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadManifest",
|
||||
"file": "<test-root-directory>/exe/<manifest-file>",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadManifest",
|
||||
"file": "<test-root-directory>/lib/<manifest-file>",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/exe/src/a_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/exe/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/lib/src/a_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/lib/src/lib.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/exe/src/a_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/exe/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/lib/src/a_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/lib/src/lib.rs",
|
||||
"ms": "__REDACTED__"
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"durations": {
|
||||
"extract": {
|
||||
|
||||
@@ -1,5 +1,72 @@
|
||||
{
|
||||
"attributes": {
|
||||
"steps": [
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/exe/src/a_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/exe/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/lib/src/a_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "extract",
|
||||
"file": "<test-root-directory>/lib/src/lib.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadManifest",
|
||||
"file": "<test-root-directory>/<manifest-file>",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/exe/src/a_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/exe/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/lib/src/a_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "loadSource",
|
||||
"file": "<test-root-directory>/lib/src/lib.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/exe/src/a_module.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/exe/src/main.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/lib/src/a_module/mod.rs",
|
||||
"ms": "__REDACTED__"
|
||||
},
|
||||
{
|
||||
"action": "parse",
|
||||
"file": "<test-root-directory>/lib/src/lib.rs",
|
||||
"ms": "__REDACTED__"
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"durations": {
|
||||
"extract": {
|
||||
|
||||
Reference in New Issue
Block a user