Commit Graph

2588 Commits

Author SHA1 Message Date
Paolo Tranquilli
9cea631399 Merge pull request #17931 from github/redsun82/rust-target-dir
Rust: allow to specify the target directory
2024-11-08 13:34:03 +01:00
Paolo Tranquilli
26839f5e15 Merge pull request #17882 from github/redsun82/rust-resolve
Rust: extract some resolved paths
2024-11-08 13:33:41 +01:00
Geoffrey White
f827ad8157 Rust: Add missing @kind diagnostic query metadata. 2024-11-08 12:33:06 +00:00
Paolo Tranquilli
b9ea78fb32 Rust: fix vector options 2024-11-08 13:06:22 +01:00
Geoffrey White
3805d0f958 Merge branch 'main' into unreachable4 2024-11-08 11:46:34 +00:00
Paolo Tranquilli
be45e3deed Rust: allow to specify more cargo configuration options
This allows to tweak via extractor options some aspects of the cargo
configuration:
* the target architecture
* features (including `*` for all, which we must understand whether to
  set by default)
* cfg overrides

Integration tests will be added in a follow-up commit.
2024-11-08 12:23:16 +01:00
Geoffrey White
7c2c5ee1fa Rust: Fix expected consistency results. 2024-11-08 11:22:35 +00:00
Geoffrey White
fc444f1f9a Merge branch 'main' into unusedvar8 2024-11-08 11:20:12 +00:00
Geoffrey White
04926df6ea Rust: Add rust/diagnostics/unresolved-macro-calls diagnostic query. 2024-11-08 10:19:43 +00:00
Geoffrey White
0d1bd8a9cd Rust: Add 'order by' to the summary stats query (doesn't seem to affect the test, but affects VSCode runs). 2024-11-08 10:19:42 +00:00
Geoffrey White
7b265b2df3 Rust: Add a deliberately unresolvable macro call to the test. 2024-11-08 09:53:32 +00:00
Geoffrey White
7279cc42f8 Rust: Add resolved macros to rust/summary/summary-stats. 2024-11-08 09:49:47 +00:00
Simon Friis Vindum
f2569c45a9 Merge pull request #17921 from paldepind/rust-df-enclosing-callable
Rust: Implement enclosing callable
2024-11-08 10:36:59 +01:00
Paolo Tranquilli
083394073a Rust: rename target_dir to cargo_target_dir, add to extraction options
Also removed the now unused `extract_dependencies` one.
2024-11-08 09:53:50 +01:00
Simon Friis Vindum
22835c28ff Rust: Make a return node the last node before function exit 2024-11-07 15:21:11 +01:00
Simon Friis Vindum
1a000ecb46 Rust: Make minor data flow changes based on PR feedback 2024-11-07 13:04:54 +01:00
Paolo Tranquilli
4f6fda0100 Rust: allow to specify the target directory 2024-11-07 12:45:20 +01:00
Paolo Tranquilli
3488b9fbca Merge pull request #17920 from github/redsun82/rust-files
Rust: exclude uncompiled files from semantics and surface semantic-less reason
2024-11-07 11:04:12 +01:00
Geoffrey White
df7bcfd116 Rust: Accept dataflow consistency check changes. 2024-11-07 09:54:39 +00:00
Paolo Tranquilli
64d522e447 Rust: address review 2024-11-07 09:39:44 +01:00
Geoffrey White
b3f7a8a46f Merge pull request #17908 from geoffw0/dfcons
Rust: Expose counts of data flow inconsistencies
2024-11-06 19:11:04 +00:00
Geoffrey White
18ce8be302 Update rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll
Co-authored-by: Simon Friis Vindum <paldepind@github.com>
2024-11-06 19:00:10 +00:00
Geoffrey White
fbfdd57383 Rust: Additional test cases for rust/dead-code. 2024-11-06 17:43:04 +00:00
Geoffrey White
a8b1cb3243 Rust: Make it so that all of the test functions may return. 2024-11-06 17:23:01 +00:00
Paolo Tranquilli
200715773f Rust: fix no_semantics_reason 2024-11-06 17:19:06 +01:00
Simon Friis Vindum
dadc6059a8 Rust: Implement enclosing callable 2024-11-06 16:23:24 +01:00
Paolo Tranquilli
2987743e44 Rust: exclude uncompiled files from semantics and surface semanticless reason 2024-11-06 15:22:28 +01:00
Geoffrey White
bf0e1008ce Rust: Move some test cases together. 2024-11-06 13:14:52 +00:00
Simon Friis Vindum
ff80b249ca Merge pull request #17917 from paldepind/rust-df-types
Rust: Fix unique type data flow inconsistency
2024-11-06 14:02:00 +01:00
Simon Friis Vindum
60986d8c9b Rust: Fix unique type data flow inconsistency 2024-11-06 13:48:10 +01:00
Tom Hvitved
f8058e40af Merge pull request #17915 from hvitved/rust/pat-literal-cfg
Rust: Include literals in the CFG for literal patterns
2024-11-06 13:09:49 +01:00
Geoffrey White
8a35e151d1 Rust: Move the function pointer parameter exclusion into VariableImpl.qll. 2024-11-06 10:51:41 +00:00
Tom Hvitved
9392bf796a Rust: Include literals in the CFG for literal patterns 2024-11-06 09:21:52 +01:00
Simon Friis Vindum
6054855edb Merge pull request #17888 from paldepind/rust-data-flow-consistency
Rust: Data flow additions
2024-11-05 21:29:18 +01:00
Geoffrey White
1a5d2e1f5d Rust: Correct a comment and autoformat. 2024-11-05 15:22:46 +00:00
Geoffrey White
93836a55e2 Rust: Clean up code / clarify responsibilities and fix the issue in rust/unused-value as well. 2024-11-05 15:16:59 +00:00
Geoffrey White
278760c735 Rust: Add another exception to rust/unused-variable. 2024-11-05 14:46:32 +00:00
Simon Friis Vindum
262a9f0cfa Rust: Make fixes in data flow based on PR feedback 2024-11-05 15:37:44 +01:00
Geoffrey White
35ffd0cc9c Rust: Add more test cases for unused variables (inspired by real world FPs). 2024-11-05 14:07:10 +00:00
Geoffrey White
3091083705 Rust: Call all the test cases. 2024-11-05 11:02:38 +00:00
Geoffrey White
088dd50f1f Rust: Update tests. 2024-11-05 10:30:41 +00:00
Geoffrey White
c8c747a110 Rust: Add total data flow inconsistencies to rust/summary/summary-statistics. 2024-11-04 19:10:44 +00:00
Geoffrey White
30cc55005d Rust: Add rust/diagnostics/data-flow-consistency-counts query for data flow inconsistency counts. 2024-11-04 19:09:30 +00:00
Simon Friis Vindum
c7b4e7c30a Rust: Small improvements to data flow
The predicate `ssaDefAssigns` was definitely broken before
2024-11-04 20:01:58 +01:00
Simon Friis Vindum
d9636b37b6 Rust: Add data flow test with assignment to mutable variable 2024-11-04 20:00:36 +01:00
Geoffrey White
91ebc0eb45 Rust: Add metadata to the DataFlowConsistency.ql query. 2024-11-04 18:53:34 +00:00
Simon Friis Vindum
8d59b9289b Rust: Make improvements to data flow based on PR feedback 2024-11-04 16:42:05 +01:00
Geoffrey White
5a34c166b7 Rust: Remove the workaround in rust/unused-variable. 2024-11-04 15:31:43 +00:00
Simon Friis Vindum
2818893010 Rust: Refactor AstCfgNode to use a field
Co-authored-by: Tom Hvitved <hvitved@github.com>
2024-11-04 15:01:25 +01:00
Simon Friis Vindum
34e8ea17d8 Merge pull request #17898 from paldepind/rust-cfg-refactor
Rust: CFG classes are in expression module iff they correspond to exp…
2024-11-04 13:01:15 +01:00