Commit Graph

85368 Commits

Author SHA1 Message Date
Arthur Baars
1f21d75399 Merge pull request #17533 from github/redsun82/codegen-parametrized-pragmas
Codegen: introduce inherited pragmas and move remaining decorations
2024-09-20 17:53:05 +02:00
Chuan-kai Lin
75ec8ce58e Java: apply query alert restrictions 2024-09-20 07:47:58 -07:00
Joe Farebrother
7aa2816570 Add changenote 2024-09-20 15:19:54 +01:00
Anders Schack-Mulligen
3a1e50dcf9 Dataflow: Simplify diff-informed implementation and tweak flag name. 2024-09-20 07:07:10 -07:00
Paolo Tranquilli
c74b6be136 Rust/Codegen: allow to "detach" property emission
By using the `rust.detach` pragma on a property, we make that property
not appear in the generated struct as a field, and provide instead
a `generated::Class::emit_property` function that can be used to emit
the corresponding TRAP entry independently.
2024-09-20 16:06:22 +02:00
Joe Farebrother
81e99bf1bb Add tests 2024-09-20 15:05:51 +01:00
Arthur Baars
69a172c7ba Rust: accept trivial expected output 2024-09-20 15:51:06 +02:00
Arthur Baars
db06ad2ac3 Rust: codegen 2024-09-20 15:51:03 +02:00
Arthur Baars
2ee61f9aaa Rust: add placeholder QLdoc annotations 2024-09-20 15:51:02 +02:00
Arthur Baars
e6e0e6eb66 Rust: accept expected output 2024-09-20 15:51:01 +02:00
Arthur Baars
a9423f4bdb Rust: codegen 2024-09-20 15:50:59 +02:00
Arthur Baars
57458d8f38 Rust: remove qldoc annotations for classes that no longer exist 2024-09-20 15:50:58 +02:00
Arthur Baars
2fdc529ac9 Rust: add qldoc annotations to schema 2024-09-20 15:50:57 +02:00
Arthur Baars
b2bddd3415 Rust: write generated schema into schema/ast.py 2024-09-20 15:50:55 +02:00
Joe Farebrother
3001a570b2 Replace uses of StringConstCompare 2024-09-20 14:47:22 +01:00
Florin Coada
f4071ddb28 Merge pull request #17538 from github/coadaflorin/docs-typo-fix
Update index.html
2024-09-20 14:47:07 +01:00
Alvaro Muñoz
a1e44bc918 Bump qlpack versions 2024-09-20 15:42:19 +02:00
GitHub Security Lab
59592cc087 Merge pull request #85 from github/improve_reusable_workflow_calls
Improve reusable workflow calls
2024-09-20 15:41:42 +02:00
Florin Coada
d290591187 Update index.html 2024-09-20 14:40:45 +01:00
Alvaro Muñoz
116d83da5f Improve reusable workflow calls 2024-09-20 15:40:41 +02:00
Paolo Tranquilli
2a95068a0a Rust: take test code also from property descriptions 2024-09-20 15:12:13 +02:00
Geoffrey White
3e0d30f13a Rust: Merge of unusedvar and unreachable work. 2024-09-20 12:58:38 +01:00
Geoffrey White
58b9355c69 Merge branch 'main' into unreachable 2024-09-20 12:53:49 +01:00
Geoffrey White
d7aa5f1022 Merge pull request #17497 from geoffw0/unusedvar
Rust: Placeholder queries for unused variable, unused value
2024-09-20 12:52:33 +01:00
Chris Smowton
bcb84a84e1 Only skip test packages at the file-extraction phase 2024-09-20 12:48:08 +01:00
Joe Farebrother
164cf27e67 Add additional constant checks to constant barrier gaurd 2024-09-20 12:46:10 +01:00
Paolo Tranquilli
4e59fa9035 Codegen: remove unneeded code 2024-09-20 12:47:45 +02:00
Paolo Tranquilli
f7afcd038a Codegen: move use_for_null to pragmas 2024-09-20 12:47:45 +02:00
Paolo Tranquilli
d2ebe00492 Codegen: move group to parametrized pragmas 2024-09-20 12:47:44 +02:00
Paolo Tranquilli
2533f18a6e Codegen: move ql.hideable to pragmas 2024-09-20 12:47:44 +02:00
Paolo Tranquilli
8d291ab938 Codegen: move qltest.test_with to parametrized pragmas 2024-09-20 12:47:44 +02:00
Paolo Tranquilli
3e2f886595 Codegen: allow inheritable pragmas 2024-09-20 12:47:43 +02:00
Paolo Tranquilli
1bffc2a7d7 Merge pull request #17532 from github/redsun82/codegen-parametrized-pragmas
Codegen: parametrized pragmas
2024-09-20 12:47:33 +02:00
Alvaro Muñoz
e9dfd9ccb4 Bump qlpack versions 2024-09-20 11:54:00 +02:00
GitHub Security Lab
d3c1db5948 Merge pull request #84 from github/report_unpin_node
Modify UnpinnedActionsTag report node
2024-09-20 11:53:26 +02:00
Alvaro Muñoz
c20e407c16 Modify UnpinnedActionsTag report node 2024-09-20 11:52:44 +02:00
Paolo Tranquilli
db00cb6827 Codegen: move class synth decorators to pragmas 2024-09-20 11:09:22 +02:00
Paolo Tranquilli
9d6ee09f65 Codegen: move rust.doc_test_signature to parametrized pragmas 2024-09-20 11:09:21 +02:00
Paolo Tranquilli
70997e8189 Codegen: move default_doc_name to parametrized pragma 2024-09-20 11:09:21 +02:00
Paolo Tranquilli
9f1d50ebd1 Codegen: allow parametrized pragmas 2024-09-20 11:09:21 +02:00
Chris Smowton
f5ff822681 Convert extract-tests option to an official extractor option 2024-09-20 10:03:54 +01:00
Chris Smowton
94cb99e51d Adjust test expectations 2024-09-20 10:03:53 +01:00
Chris Smowton
9d79feb4d3 Autoformat go 2024-09-20 10:03:52 +01:00
Chris Smowton
eb6918f88f Autoformat 2024-09-20 10:03:51 +01:00
Chris Smowton
fd592fa18f Add tests 2024-09-20 10:03:46 +01:00
Chris Smowton
c3dffc955b Apply review comments 2024-09-20 09:56:29 +01:00
Chris Smowton
76e6942594 Go: support extracting test code
This implements support for test extraction by two mechanisms:

* In autobuild mode, setting `CODEQL_EXTRACTOR_GO_EXTRACT_TESTS` to `true`.
* In manual build mode, tracing a `go test` command (`go test -c` is to be recommended for efficiency).

Go deals with test compilation by creating several extra packages on top of those expected from inspection of the source code (see docs of `packages.Load` for more detail): packages whose IDs include a suffix like `mydomain.com/mypackage [mydomain.com/mypackage.test]`, and packages containing generated test driver code like `mydomain.com/mypackage.test`. There are also additional packages like `mydomain.com/mypackage_tests` which are explicitly present in source code, but not compiled by a normal `go build`.

So far as I can tell, the purpose of the two variants of the package is to resolve dependency cycles (because the tests variant of the package can have more dependencies than the non-tests variant, and non-test code can compile against non-test package variants). Since the test package variants seems to be a superset of the non-tests variant, I employ the simple heuristic of ignoring the variant of each package with the shortest ID. I haven't seen a case where there are three or more variants of a package, so I expect this to always identify the tests variant as the preferred one. If several variants were extracted, and we were to attempt to match Golang's linkage strategy among the different variants, we would need to extend trap-file name and most top-level symbol trap IDs with the package variant they come from; I hope this won't prove necessary.

"Real" `_tests` packages, and wholly synthetic driver code packages, are extracted just like normal.
2024-09-20 09:56:28 +01:00
Arthur Baars
594045b634 Merge pull request #17530 from github/redsun82/codegen-annotate
Codegen: allow full annotation of classes
2024-09-20 10:38:44 +02:00
Tom Hvitved
f2e943f9ba Merge pull request #17520 from hvitved/cfg/no-kind-graph
Shared: Do not use `@kind graph` for CFG test output
2024-09-20 10:10:05 +02:00
Paolo Tranquilli
74c0fa7154 Codegen: allow annotations to add class decorations 2024-09-20 08:40:34 +02:00