Arthur Baars
292c6b6159
Clear out unused comments
2024-09-12 17:58:17 +02:00
Arthur Baars
2a88086544
Rust: AST: add docs with examples for qltest
2024-09-12 17:58:15 +02:00
Simon Friis Vindum
f73680ba21
Rust: Handle short-circuiting logical binary operators
2024-09-12 17:30:05 +02:00
Geoffrey White
7907cbeae1
Rust: Add query suites (identical to the Swift ones apart from their names).
2024-09-12 15:55:06 +01:00
Paolo Tranquilli
0b850a2dff
Rust: add missing doc
2024-09-12 16:51:52 +02:00
Simon Friis Vindum
c821ec21bb
Rust: CFG edge for return in functions
2024-09-12 16:25:43 +02:00
Paolo Tranquilli
beb27bf5e3
Rust: fix QL compilation and schema includes ordering
2024-09-12 15:05:30 +02:00
Simon Friis Vindum
e1f2fa8c7e
Rust: Support break and continue in loops
2024-09-12 14:07:43 +02:00
Geoffrey White
f77c79593e
Rust: Updated expected for changes on main.
2024-09-12 12:46:04 +01:00
Geoffrey White
9d8b514b5c
Merge remote-tracking branch 'upstream/main' into files
2024-09-12 12:29:44 +01:00
Paolo Tranquilli
b4b680775c
Rust: integrate into standard files+location library
2024-09-12 13:17:10 +02:00
Paolo Tranquilli
ed0370b715
Rust: update rust/tools/qltest.sh
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2024-09-12 12:28:22 +02:00
Simon Friis Vindum
3dc517c82b
Rust: Handle absence of else branch in if expression in CFG
2024-09-12 10:35:00 +02:00
Simon Friis Vindum
67a06cb772
Rust: Support loop in CFG
2024-09-12 09:29:19 +02:00
Paolo Tranquilli
aeae922ef3
Rust: make ql tests extract files together
...
For the moment this removes the possibility to set custom flags or env
variables for the extractor via comments, but that can be added back
easily if needed with a different mechanism (like an `env` file).
2024-09-12 09:13:35 +02:00
Paolo Tranquilli
5ae8824303
Rust: add context to parameter file expansion errors
2024-09-12 08:56:07 +02:00
Paolo Tranquilli
6adf88542e
Rust: fix linting script
2024-09-12 08:53:08 +02:00
Paolo Tranquilli
0a8c0f5ab4
Rust: fix bazel build
2024-09-12 08:46:50 +02:00
Geoffrey White
c2e86423b9
Rust: Test the successfully extracted files diagnostic.
2024-09-11 17:10:08 +01:00
Geoffrey White
f1d281ffcc
Rust: Add test cases for diagnostics.
2024-09-11 17:10:07 +01:00
Geoffrey White
a933f0d695
Rust: Add diagnostic query for successfully extracted files.
2024-09-11 16:45:33 +01:00
Paolo Tranquilli
1b3a5cdab1
Rust: make the cli flags override automatic
...
This makes the clap flags overlay over `Config` entirely derived via an
attribute macro. Also, the `--intputs-file` option is replaced by a more
standard and versatile `@` parameter file mechanism.
2024-09-11 17:28:59 +02:00
Simon Friis Vindum
fea6017688
Merge pull request #17415 from paldepind/rust-control-flow-graph
...
Rust: Basic control flow graph setup
2024-09-11 15:08:33 +02:00
Paolo Tranquilli
e4766b60c3
Rust: make QL test crates workspaces
2024-09-11 11:29:04 +02:00
Simon Friis Vindum
857edb791c
Rust: Fix control flow tree for function and block expression
2024-09-11 11:18:56 +02:00
Simon Friis Vindum
809d040528
Make more classes private and final
2024-09-11 09:37:39 +02:00
Paolo Tranquilli
304e68df30
Merge pull request #17426 from geoffw0/readme
...
Rust: Add a README.md
2024-09-11 09:26:27 +02:00
Simon Friis Vindum
6d972bea2c
Rust: Add a few control flow tree classes
2024-09-11 09:08:54 +02:00
Simon Friis Vindum
91d5171d90
Add base setup for control flow graph construction
2024-09-11 09:08:53 +02:00
Paolo Tranquilli
f8c9d96882
Bazel: remove non-working fake tree-sitter-extractor workaround
...
The `.cargo/config.toml` override based workaround wasn't really
working, as while `cargo build|check` was reading that, `cargo metadata`
wasn't, ending up in a completely broken IDE experience.
For the moment, we just use a unified workspace `Cargo.toml` for all
extractors using the shared tree-sitter code, which has the downside of
making bazel pull in dependencies for all of them, and not being able to
do sparse checkouts for them. We should investigate and rivist this in
the future.
2024-09-11 08:17:11 +02:00
Geoffrey White
7c95bb243e
Rust: Update example path.
2024-09-10 17:09:51 +01:00
Geoffrey White
6b0d7bcda8
Rust: Remove repo warning because we're merging into main real soon now...
2024-09-10 17:08:11 +01:00
Paolo Tranquilli
4f90f5fb4c
Rust: accept test changes
2024-09-10 17:36:18 +02:00
Arthur Baars
d6d52a97a2
Fix definition of trap compression option
...
unless the -Oextract_dependencies=true flag is supplied
2024-09-10 17:13:49 +02:00
Paolo Tranquilli
9c8f6145ab
Merge pull request #17408 from github/aibaars/rust-experiment
...
Rust: add partial extractor for Expr, Statement, Pattern
2024-09-10 17:09:47 +02:00
Geoffrey White
d9a37119f8
Update rust/README.md
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2024-09-10 16:04:22 +01:00
Geoffrey White
ac9afea75e
Rust: Add experimental warning and Bazelisk link.
2024-09-10 16:02:53 +01:00
Arthur Baars
bffdf2b179
Replace println with log statements
2024-09-10 16:59:32 +02:00
Arthur Baars
f37b4aebc2
Only extract function bodies for local crates,
...
unless the -Oextract_dependencies=true flag is supplied
2024-09-10 16:49:13 +02:00
Arthur Baars
43e54fb0ae
Use custom target folder
2024-09-10 16:49:12 +02:00
Geoffrey White
8213bbb14a
Rust: Add a README.md
2024-09-10 15:47:40 +01:00
Arthur Baars
1e830dad1a
Add ra_ap_paths dependency
2024-09-10 15:14:36 +02:00
Arthur Baars
a5d1d9e167
Make implementation more complete
...
Use Unimplemented to mark AstNodes that need implementing
2024-09-10 14:13:05 +02:00
Arthur Baars
2ae725784c
Don't use _ to ignore things so rustc will show warnings for all the gaps in the implementation
2024-09-10 12:26:56 +02:00
Arthur Baars
b2451c6667
Improve schema
2024-09-10 12:26:54 +02:00
Arthur Baars
46bfefc99a
Address comments
2024-09-10 12:26:53 +02:00
Paolo Tranquilli
ef06b555c1
Rust: accept test changes
2024-09-10 11:29:54 +02:00
Paolo Tranquilli
437b671035
Merge branch 'rust-experiment' into aibaars/rust-experiment
...
Also fixed conflicts and applied linting (can be done via
`rust/lint.py` or `pre-commit` configuration).
2024-09-10 10:24:49 +02:00
Paolo Tranquilli
38c25f96e5
Rust: add linting pre-commit hook
2024-09-10 10:22:45 +02:00
Paolo Tranquilli
37afad2f70
Merge pull request #17410 from github/redsun82/rust-ci
...
Rust: set up `codeql` CI
2024-09-10 10:04:24 +02:00