Commit Graph

71783 Commits

Author SHA1 Message Date
Tom Hvitved
e5f2bbb6ec Python: Post-processing query for inline test expectations 2024-10-29 13:35:37 +01:00
Tom Hvitved
4750b0de94 C++: Post-processing query for inline test expectations 2024-10-29 13:35:36 +01:00
Tom Hvitved
540b433f5a Go: Post-processing query for inline test expectations 2024-10-29 13:35:35 +01:00
Tom Hvitved
4561770db4 Swift: Post-processing query for inline test expectations 2024-10-29 13:35:34 +01:00
Tom Hvitved
5b5ca05e87 Ruby: Post-processing query for inline test expectations 2024-10-29 13:35:33 +01:00
Tom Hvitved
e2b614d18a Java: Post-processing query for inline test expectations 2024-10-29 13:35:32 +01:00
Tom Hvitved
8ba80fd022 C#: Post-processing query for inline test expectations 2024-10-29 13:35:31 +01:00
Tom Hvitved
e7a3e6bfed Shared: Post-processing query for inline test expectations 2024-10-29 13:35:29 +01:00
Tom Hvitved
b111194fbc Shared: Simplify PrettyPrintModels.ql 2024-10-29 13:35:28 +01:00
Tom Hvitved
c5d699cb6b Merge pull request #17857 from geoffw0/unreachable3
Rust: Fix rust/dead-code
2024-10-29 13:35:10 +01:00
Asger F
879cb7c365 Merge pull request #17864 from asgerf/js/vue-attribute-syntax
JS: Fix parsing of special Vue attributes
2024-10-29 13:23:47 +01:00
Ian Lynagh
251a8a34ed Java: Add up/downgrade scripts 2024-10-29 11:32:22 +00:00
Geoffrey White
6a110368a5 Rust: Rename predicates. 2024-10-29 11:32:22 +00:00
Ian Lynagh
6be2e98796 Java/Kotlin: Remove the erasure relation
It's no longer used
2024-10-29 11:32:20 +00:00
Ian Lynagh
8ab52dba83 Kotlin: Don't write the erasure relation
It's no longer used
2024-10-29 11:32:18 +00:00
Ian Lynagh
6c9739023d Java: Remove redundant getErasure overrides
The root definition covers these cases already
2024-10-29 11:32:16 +00:00
Rasmus Wriedt Larsen
7c7420a9a4 JS: Add change-note 2024-10-29 11:35:56 +01:00
Rasmus Wriedt Larsen
07bc1feb11 Docs: Threat-models supported in JS
Capturing
- 7d3793e718
- e35c2b243a
- e11bfc27bd
2024-10-29 11:33:02 +01:00
Rasmus Wriedt Larsen
84f6b89ced JS: Minor improvements to threat-model Concepts
Mirroring what was done for Python
2024-10-29 11:29:48 +01:00
Asger F
6aef571c17 JS: Bump extractor version string 2024-10-29 11:28:06 +01:00
Asger F
3cc6b11e6b JS: Expand attribute regex to include some Vue attributes 2024-10-29 11:19:01 +01:00
Asger F
560b3da851 JS: Add test with some special Vue attributes 2024-10-29 11:18:17 +01:00
Tom Hvitved
7ddc8f087d Merge pull request #17786 from paldepind/rust-saa-additions
Rust: SSA additions
2024-10-29 09:51:38 +01:00
Tom Hvitved
813ccb9c06 Merge pull request #17855 from hvitved/csharp/comments-mapped-locations
C#: Take mapped locations into account in `Comments.qll`
2024-10-29 08:58:38 +01:00
Anders Schack-Mulligen
1d3bad1358 UniversalFlow: More renaming. 2024-10-29 08:53:18 +01:00
Erik Krogh Kristensen
733158f8f2 Merge pull request #17860 from erik-krogh/fix-windows
fix the RAM setting on Windows
2024-10-29 08:34:09 +01:00
erik-krogh
2ee88f6774 fix the RAM setting on Windows 2024-10-28 20:39:34 +01:00
Arthur Baars
c87f2c4eb1 Rust: remove unnecessary field 2024-10-28 18:56:20 +01:00
Paolo Tranquilli
2b386c422c Merge pull request #17839 from github/redsun82/rust-analysis
Rust: add codeql analysis workflow
2024-10-28 18:14:32 +01:00
Dave Bartolomeo
d4db759057 Merge pull request #17858 from github/dbartol/actions-placeholder 2024-10-28 11:57:20 -04:00
Dave Bartolomeo
609a6c38e4 Revert "Fix bash nit"
This reverts commit 3228447544.
2024-10-28 11:39:22 -04:00
Dave Bartolomeo
a70ce25144 Merge pull request #17850 from github/dbartol/actions-placeholder
Implement Actions extractor and placeholder Actions QL packs
2024-10-28 11:34:00 -04:00
Anders Schack-Mulligen
7d98d391b7 UniversalFlow: Rename FlowScc. 2024-10-28 16:28:28 +01:00
Anders Schack-Mulligen
d41b86a87d UniversalFlow: Tweak visibility and add qldoc. 2024-10-28 16:27:27 +01:00
Anders Schack-Mulligen
6680537e93 UniversalFlow: Minor tweak to isNull and autoformat. 2024-10-28 16:25:30 +01:00
Anders Schack-Mulligen
d6e420bd0e UniversalFlow: Rename node type. 2024-10-28 16:23:44 +01:00
Anders Schack-Mulligen
1aecdb44dc UniversalFlow: Move Universal Flow library to its own file. 2024-10-28 16:20:16 +01:00
Taus
5d6600e61f Python: Fix generator expression locations
Our logic for detecting the first and last item in a generator
expression was faulty, sometimes matching comments as well. Because
attributes (like `_location_start`) can only be written once, this
caused `tree-sitter-graph` to get unhappy.

To fix this, we now require the first item to be an `expression`, and
the last one to be either a `for_in_clause` or an `if_clause`.
Crucially, `comment` is neither of these, and this prevents the
unfortunate overlap.
2024-10-28 14:53:09 +00:00
Taus
ef60b730ea Python: Fix parenthesized tuple parser bug
We were writing the `parenthesised` attribute twice on tuples, once
because of the explicit parenthetisation, and once because all non-empty
tuples are parenthesised. This made `tree-sitter-graph` unhappy.

To fix this, we now explicitly check whether a tuple is already
parenthesised, and do nothing if that is the case.
2024-10-28 14:49:45 +00:00
Anders Schack-Mulligen
ea458c09a0 TypeFlow: Extract a universal flow library abstraction from TypeFlow. 2024-10-28 15:48:29 +01:00
Taus
b4ecc7937d Python: Fix some more async parsing problems
Turns out we were not setting the `is_async` field on anything except
`async for` statements. This commit makes it so that we also do this for
`async def` and `async with`, and adds a test that this produces the
same behaviour as the old parser.
2024-10-28 14:44:02 +00:00
Taus
e710c0a6bf Python: Regenerate parser files 2024-10-28 14:44:01 +00:00
Taus
ac87868097 Python: Fix parsing of await inside expressions
Found when parsing `Lib/test/test_coroutines.py` using the new parser.

For whatever reason, having `await` be an `expression` (with an argument
of the same kind) resulted in a bad parse. Consulting the official
grammar, we see that `await` should actually be a `primary_expression`
instead. This is also more in line with the other unary operators, whose
precedence is shared by the `await` syntax.
2024-10-28 14:44:01 +00:00
Taus
1e51703ce9 Python: Allow escaped quotes/backslashes in raw strings
Quoting the Python documentation (last paragraph of
https://docs.python.org/3/reference/lexical_analysis.html#escape-sequences):

"Even in a raw literal, quotes can be escaped with a backslash, but the
backslash remains in the result; for example, r"\"" is a valid string
literal consisting of two characters: a backslash and a double quote;
r"\" is not a valid string literal (even a raw string cannot end in an
odd number of backslashes)."

We did not handle this correctly in the scanner, as we only consumed the
backslash but not the following single or double quote, resulting in
that character getting interpreted as the end of the string.

To fix this, we do a second lookahead after consuming the backslash, and
if the next character is the end character for the string, we advance
the lexer across it as well.

Similarly, backslashes in raw strings can escape other backslashes.
Thus, for a string like '\\' we must consume the second backslash,
otherwise we'll interpret it as escaping the end quote.
2024-10-28 14:40:24 +00:00
Geoffrey White
eb79bcbc34 Rust: Remove unnecessary line. 2024-10-28 14:36:45 +00:00
Geoffrey White
bf5a0b7bd0 Rust: Rewrite UnreachableCode.ql to be more robust. 2024-10-28 14:36:42 +00:00
Geoffrey White
41df9ae4fc Merge pull request #17854 from geoffw0/cleanuptest
Rust: Clean up unreachable test
2024-10-28 14:29:42 +00:00
Paolo Tranquilli
f5d14dbe07 Merge pull request #17856 from github/redsun82/rust-defaultSuiteFile
Rust: add `defaultSuiteFile`
2024-10-28 15:27:51 +01:00
Simon Friis Vindum
8f8564ddfd Rust: Address PR comments 2024-10-28 15:15:38 +01:00
Anders Schack-Mulligen
fba4d09e65 TypeFlow: Simplify interface. 2024-10-28 15:09:09 +01:00