Skip to content

Commit

Permalink
Rust: Post-processing query for inline test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Oct 29, 2024
1 parent 3456c29 commit 9a59207
Show file tree
Hide file tree
Showing 10 changed files with 373 additions and 368 deletions.
42 changes: 21 additions & 21 deletions rust/ql/test/query-tests/unusedentities/UnreachableCode.expected
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
| unreachable.rs:13:3:13:17 | ExprStmt | This code is never reached. |
| unreachable.rs:21:3:21:17 | ExprStmt | This code is never reached. |
| unreachable.rs:33:3:33:17 | ExprStmt | This code is never reached. |
| unreachable.rs:40:3:40:17 | ExprStmt | This code is never reached. |
| unreachable.rs:61:2:61:16 | ExprStmt | This code is never reached. |
| unreachable.rs:107:16:107:23 | ExprStmt | This code is never reached. |
| unreachable.rs:115:15:115:22 | ExprStmt | This code is never reached. |
| unreachable.rs:131:2:131:16 | ExprStmt | This code is never reached. |
| unreachable.rs:141:2:141:16 | ExprStmt | This code is never reached. |
| unreachable.rs:148:3:148:17 | ExprStmt | This code is never reached. |
| unreachable.rs:157:4:157:18 | ExprStmt | This code is never reached. |
| unreachable.rs:163:3:163:17 | ExprStmt | This code is never reached. |
| unreachable.rs:169:4:169:18 | ExprStmt | This code is never reached. |
| unreachable.rs:177:4:177:18 | ExprStmt | This code is never reached. |
| unreachable.rs:180:2:180:16 | ExprStmt | This code is never reached. |
| unreachable.rs:197:2:197:16 | ExprStmt | This code is never reached. |
| unreachable.rs:203:3:203:17 | ExprStmt | This code is never reached. |
| unreachable.rs:206:2:206:16 | ExprStmt | This code is never reached. |
| unreachable.rs:218:3:218:17 | ExprStmt | This code is never reached. |
| unreachable.rs:233:2:233:16 | ExprStmt | This code is never reached. |
| unreachable.rs:242:2:242:16 | ExprStmt | This code is never reached. |
| unreachable.rs:11:9:11:23 | ExprStmt | This code is never reached. |
| unreachable.rs:19:9:19:23 | ExprStmt | This code is never reached. |
| unreachable.rs:31:9:31:23 | ExprStmt | This code is never reached. |
| unreachable.rs:38:9:38:23 | ExprStmt | This code is never reached. |
| unreachable.rs:59:5:59:19 | ExprStmt | This code is never reached. |
| unreachable.rs:106:13:106:20 | ExprStmt | This code is never reached. |
| unreachable.rs:115:13:115:20 | ExprStmt | This code is never reached. |
| unreachable.rs:131:5:131:19 | ExprStmt | This code is never reached. |
| unreachable.rs:141:5:141:19 | ExprStmt | This code is never reached. |
| unreachable.rs:148:9:148:23 | ExprStmt | This code is never reached. |
| unreachable.rs:157:13:157:27 | ExprStmt | This code is never reached. |
| unreachable.rs:163:9:163:23 | ExprStmt | This code is never reached. |
| unreachable.rs:169:13:169:27 | ExprStmt | This code is never reached. |
| unreachable.rs:177:13:177:27 | ExprStmt | This code is never reached. |
| unreachable.rs:180:5:180:19 | ExprStmt | This code is never reached. |
| unreachable.rs:197:5:197:19 | ExprStmt | This code is never reached. |
| unreachable.rs:204:9:204:23 | ExprStmt | This code is never reached. |
| unreachable.rs:207:5:207:19 | ExprStmt | This code is never reached. |
| unreachable.rs:220:9:220:23 | ExprStmt | This code is never reached. |
| unreachable.rs:235:5:235:19 | ExprStmt | This code is never reached. |
| unreachable.rs:244:5:244:19 | ExprStmt | This code is never reached. |
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
queries/unusedentities/UnreachableCode.ql
query: queries/unusedentities/UnreachableCode.ql
postprocess: utils/InlineExpectationsTestQuery.ql
22 changes: 11 additions & 11 deletions rust/ql/test/query-tests/unusedentities/UnusedValue.expected
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
| main.rs:65:5:65:5 | g | Variable is assigned a value that is never used. |
| main.rs:87:9:87:9 | a | Variable is assigned a value that is never used. |
| main.rs:108:9:108:10 | is | Variable is assigned a value that is never used. |
| main.rs:133:13:133:17 | total | Variable is assigned a value that is never used. |
| main.rs:203:13:203:31 | res | Variable is assigned a value that is never used. |
| main.rs:218:9:218:24 | kind | Variable is assigned a value that is never used. |
| main.rs:223:9:223:32 | kind | Variable is assigned a value that is never used. |
| main.rs:280:13:280:17 | total | Variable is assigned a value that is never used. |
| main.rs:348:5:348:39 | kind | Variable is assigned a value that is never used. |
| main.rs:370:9:370:9 | x | Variable is assigned a value that is never used. |
| main.rs:378:17:378:17 | x | Variable is assigned a value that is never used. |
| main.rs:131:13:131:17 | total | Variable is assigned a value that is never used. |
| main.rs:194:13:194:31 | res | Variable is assigned a value that is never used. |
| main.rs:206:9:206:24 | kind | Variable is assigned a value that is never used. |
| main.rs:210:9:210:32 | kind | Variable is assigned a value that is never used. |
| main.rs:266:13:266:17 | total | Variable is assigned a value that is never used. |
| main.rs:334:5:334:39 | kind | Variable is assigned a value that is never used. |
| main.rs:359:9:359:9 | x | Variable is assigned a value that is never used. |
| main.rs:367:17:367:17 | x | Variable is assigned a value that is never used. |
| more.rs:24:9:24:11 | val | Variable is assigned a value that is never used. |
| more.rs:46:9:46:14 | a_ptr4 | Variable is assigned a value that is never used. |
| more.rs:61:9:61:13 | d_ptr | Variable is assigned a value that is never used. |
| more.rs:67:9:67:17 | f_ptr | Variable is assigned a value that is never used. |
| more.rs:44:9:44:14 | a_ptr4 | Variable is assigned a value that is never used. |
| more.rs:59:9:59:13 | d_ptr | Variable is assigned a value that is never used. |
| more.rs:65:9:65:17 | f_ptr | Variable is assigned a value that is never used. |
3 changes: 2 additions & 1 deletion rust/ql/test/query-tests/unusedentities/UnusedValue.qlref
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
queries/unusedentities/UnusedValue.ql
query: queries/unusedentities/UnusedValue.ql
postprocess: utils/InlineExpectationsTestQuery.ql
38 changes: 19 additions & 19 deletions rust/ql/test/query-tests/unusedentities/UnusedVariable.expected
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
| main.rs:25:9:25:9 | a | Variable is not used. |
| main.rs:90:13:90:13 | d | Variable is not used. |
| main.rs:141:5:141:5 | y | Variable is not used. |
| main.rs:168:9:168:9 | x | Variable is not used. |
| main.rs:250:17:250:17 | a | Variable is not used. |
| main.rs:258:20:258:22 | val | Variable is not used. |
| main.rs:272:14:272:16 | val | Variable is not used. |
| main.rs:287:22:287:24 | val | Variable is not used. |
| main.rs:294:24:294:26 | val | Variable is not used. |
| main.rs:302:13:302:15 | num | Variable is not used. |
| main.rs:317:12:317:12 | j | Variable is not used. |
| main.rs:337:25:337:25 | y | Variable is not used. |
| main.rs:340:28:340:28 | a | Variable is not used. |
| main.rs:343:9:343:9 | p | Variable is not used. |
| main.rs:358:9:358:13 | right | Variable is not used. |
| main.rs:364:9:364:14 | right2 | Variable is not used. |
| main.rs:371:13:371:13 | y | Variable is not used. |
| main.rs:379:21:379:21 | y | Variable is not used. |
| main.rs:427:27:427:29 | val | Variable is not used. |
| main.rs:430:22:430:24 | acc | Variable is not used. |
| main.rs:455:9:455:14 | unused | Variable is not used. |
| main.rs:139:5:139:5 | y | Variable is not used. |
| main.rs:166:9:166:9 | x | Variable is not used. |
| main.rs:236:17:236:17 | a | Variable is not used. |
| main.rs:244:20:244:22 | val | Variable is not used. |
| main.rs:258:14:258:16 | val | Variable is not used. |
| main.rs:273:22:273:24 | val | Variable is not used. |
| main.rs:280:24:280:26 | val | Variable is not used. |
| main.rs:288:13:288:15 | num | Variable is not used. |
| main.rs:303:12:303:12 | j | Variable is not used. |
| main.rs:323:25:323:25 | y | Variable is not used. |
| main.rs:326:28:326:28 | a | Variable is not used. |
| main.rs:329:9:329:9 | p | Variable is not used. |
| main.rs:347:9:347:13 | right | Variable is not used. |
| main.rs:353:9:353:14 | right2 | Variable is not used. |
| main.rs:360:13:360:13 | y | Variable is not used. |
| main.rs:368:21:368:21 | y | Variable is not used. |
| main.rs:413:26:413:28 | val | Variable is not used. |
| main.rs:416:21:416:23 | acc | Variable is not used. |
| main.rs:437:9:437:14 | unused | Variable is not used. |
3 changes: 2 additions & 1 deletion rust/ql/test/query-tests/unusedentities/UnusedVariable.qlref
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
queries/unusedentities/UnusedVariable.ql
query: queries/unusedentities/UnusedVariable.ql
postprocess: utils/InlineExpectationsTestQuery.ql
Loading

0 comments on commit 9a59207

Please sign in to comment.