Skip to content

Commit 556774e

Browse files
author
Paolo Tranquilli
committed
Rust: do not put extraction steps in the expected diagnostics
1 parent 8abd3c4 commit 556774e

File tree

4 files changed

+3
-176
lines changed

4 files changed

+3
-176
lines changed

rust/ql/integration-tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def rust_check_diagnostics(check_diagnostics):
1919
check_diagnostics.replacements += [
2020
(r'"ms"\s*:\s*[0-9]+', '"ms": "REDACTED"'),
2121
(r'"pretty"\s*:\s*"[0-9]+:[0-9]{2}:[0-9]{2}.[0-9]{3}"', '"pretty": "REDACTED"'),
22-
(r'Cargo.toml|rust-project.json', "<manifest>"),
23-
(r'"//\?/', '"'), # remove windows `//?/` long path syntax
22+
]
23+
check_diagnostics.skip += [
24+
"attributes.steps", # the order of the steps is not stable
2425
]
2526
return check_diagnostics

rust/ql/integration-tests/hello-project/diagnostics.expected

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,5 @@
11
{
22
"attributes": {
3-
"steps": [
4-
{
5-
"loadManifest": "<test-root-directory>/<manifest>",
6-
"ms": "REDACTED"
7-
},
8-
{
9-
"fetchFile": "<test-root-directory>/src/directory_module/mod.rs",
10-
"ms": "REDACTED"
11-
},
12-
{
13-
"ms": "REDACTED",
14-
"parse": "<test-root-directory>/src/directory_module/mod.rs"
15-
},
16-
{
17-
"extract": "<test-root-directory>/src/directory_module/mod.rs",
18-
"ms": "REDACTED"
19-
},
20-
{
21-
"fetchFile": "<test-root-directory>/src/directory_module/nested_module.rs",
22-
"ms": "REDACTED"
23-
},
24-
{
25-
"ms": "REDACTED",
26-
"parse": "<test-root-directory>/src/directory_module/nested_module.rs"
27-
},
28-
{
29-
"extract": "<test-root-directory>/src/directory_module/nested_module.rs",
30-
"ms": "REDACTED"
31-
},
32-
{
33-
"ms": "REDACTED",
34-
"parse": "<test-root-directory>/src/directory_module/not_loaded.rs"
35-
},
36-
{
37-
"extract": "<test-root-directory>/src/directory_module/not_loaded.rs",
38-
"ms": "REDACTED"
39-
},
40-
{
41-
"fetchFile": "<test-root-directory>/src/file_module.rs",
42-
"ms": "REDACTED"
43-
},
44-
{
45-
"ms": "REDACTED",
46-
"parse": "<test-root-directory>/src/file_module.rs"
47-
},
48-
{
49-
"extract": "<test-root-directory>/src/file_module.rs",
50-
"ms": "REDACTED"
51-
},
52-
{
53-
"fetchFile": "<test-root-directory>/src/main.rs",
54-
"ms": "REDACTED"
55-
},
56-
{
57-
"ms": "REDACTED",
58-
"parse": "<test-root-directory>/src/main.rs"
59-
},
60-
{
61-
"extract": "<test-root-directory>/src/main.rs",
62-
"ms": "REDACTED"
63-
}
64-
],
653
"summary": {
664
"numberOfFiles": 4,
675
"numberOfManifests": 1,

rust/ql/integration-tests/hello-workspace/diagnostics.cargo.expected

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,5 @@
11
{
22
"attributes": {
3-
"steps": [
4-
{
5-
"loadManifest": "<test-root-directory>/lib/<manifest>",
6-
"ms": "REDACTED"
7-
},
8-
{
9-
"fetchFile": "<test-root-directory>/lib/src/a_module/mod.rs",
10-
"ms": "REDACTED"
11-
},
12-
{
13-
"ms": "REDACTED",
14-
"parse": "<test-root-directory>/lib/src/a_module/mod.rs"
15-
},
16-
{
17-
"extract": "<test-root-directory>/lib/src/a_module/mod.rs",
18-
"ms": "REDACTED"
19-
},
20-
{
21-
"fetchFile": "<test-root-directory>/lib/src/lib.rs",
22-
"ms": "REDACTED"
23-
},
24-
{
25-
"ms": "REDACTED",
26-
"parse": "<test-root-directory>/lib/src/lib.rs"
27-
},
28-
{
29-
"extract": "<test-root-directory>/lib/src/lib.rs",
30-
"ms": "REDACTED"
31-
},
32-
{
33-
"loadManifest": "<test-root-directory>/exe/<manifest>",
34-
"ms": "REDACTED"
35-
},
36-
{
37-
"fetchFile": "<test-root-directory>/exe/src/a_module.rs",
38-
"ms": "REDACTED"
39-
},
40-
{
41-
"ms": "REDACTED",
42-
"parse": "<test-root-directory>/exe/src/a_module.rs"
43-
},
44-
{
45-
"extract": "<test-root-directory>/exe/src/a_module.rs",
46-
"ms": "REDACTED"
47-
},
48-
{
49-
"fetchFile": "<test-root-directory>/exe/src/main.rs",
50-
"ms": "REDACTED"
51-
},
52-
{
53-
"ms": "REDACTED",
54-
"parse": "<test-root-directory>/exe/src/main.rs"
55-
},
56-
{
57-
"extract": "<test-root-directory>/exe/src/main.rs",
58-
"ms": "REDACTED"
59-
}
60-
],
613
"summary": {
624
"numberOfFiles": 4,
635
"numberOfManifests": 2,

rust/ql/integration-tests/hello-workspace/diagnostics.rust-project.expected

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,5 @@
11
{
22
"attributes": {
3-
"steps": [
4-
{
5-
"loadManifest": "<test-root-directory>/<manifest>",
6-
"ms": "REDACTED"
7-
},
8-
{
9-
"fetchFile": "<test-root-directory>/exe/src/a_module.rs",
10-
"ms": "REDACTED"
11-
},
12-
{
13-
"ms": "REDACTED",
14-
"parse": "<test-root-directory>/exe/src/a_module.rs"
15-
},
16-
{
17-
"extract": "<test-root-directory>/exe/src/a_module.rs",
18-
"ms": "REDACTED"
19-
},
20-
{
21-
"fetchFile": "<test-root-directory>/exe/src/main.rs",
22-
"ms": "REDACTED"
23-
},
24-
{
25-
"ms": "REDACTED",
26-
"parse": "<test-root-directory>/exe/src/main.rs"
27-
},
28-
{
29-
"extract": "<test-root-directory>/exe/src/main.rs",
30-
"ms": "REDACTED"
31-
},
32-
{
33-
"fetchFile": "<test-root-directory>/lib/src/a_module/mod.rs",
34-
"ms": "REDACTED"
35-
},
36-
{
37-
"ms": "REDACTED",
38-
"parse": "<test-root-directory>/lib/src/a_module/mod.rs"
39-
},
40-
{
41-
"extract": "<test-root-directory>/lib/src/a_module/mod.rs",
42-
"ms": "REDACTED"
43-
},
44-
{
45-
"fetchFile": "<test-root-directory>/lib/src/lib.rs",
46-
"ms": "REDACTED"
47-
},
48-
{
49-
"ms": "REDACTED",
50-
"parse": "<test-root-directory>/lib/src/lib.rs"
51-
},
52-
{
53-
"extract": "<test-root-directory>/lib/src/lib.rs",
54-
"ms": "REDACTED"
55-
}
56-
],
573
"summary": {
584
"numberOfFiles": 4,
595
"numberOfManifests": 1,

0 commit comments

Comments
 (0)