Commit Graph

2802 Commits

Author SHA1 Message Date
Michael Nebel
f412d49ba4 C#: Add some examples lambdas with different kind of attributes and update existing testcases. 2022-02-04 16:34:58 +01:00
Michael Nebel
bb3f9cea3a C#: Update test cases(s) expected output. 2022-02-04 16:34:58 +01:00
Michael Nebel
7520948ec4 C#: Add test case for finding lambdas with explicit return types. 2022-02-04 16:34:58 +01:00
Michael Nebel
83a5ef4961 C#: Examples of lambda expressions with explicit return types. 2022-02-04 16:34:58 +01:00
Michael Nebel
ccb727e3ca C#: Test cases that shows that lambdas can be naturally (implicitly) typed and that the type is indistinguishable from the equivalent explicitly typed declaration. 2022-02-04 16:34:57 +01:00
Michael Nebel
a67033034a C#: Example of naturally typed lambda. 2022-02-04 16:34:57 +01:00
Michael Nebel
567768134f Merge pull request #7792 from michaelnebel/csharp/attributes
C#: Attribute kind and return value attributes.
2022-02-04 14:10:51 +01:00
Michael Nebel
6487b546dc C#: Update TargetFramework testcases expected files as well, as these also uses the string representation of the attributes. 2022-02-04 13:05:08 +01:00
Michael Nebel
ade119f4a8 C#: Add flow test cases for undetected value flow, when making variable bindinds in pattern matching. 2022-02-04 12:57:58 +01:00
Michael Nebel
f365477996 C#: Address review comments and update test output. 2022-02-04 11:48:12 +01:00
Harry Maclean
ab7fd89653 Merge pull request #7663 from github/hmac/api-graph-subclass
Ruby: Add basic subclassing support to API Graphs
2022-02-04 10:19:07 +13:00
Tom Hvitved
7b5699d058 C#: Update CIL attributes test 2022-02-02 19:25:30 +01:00
Tom Hvitved
2fe65128a0 C#: Update CIL type annotations test 2022-02-02 19:25:30 +01:00
Tom Hvitved
c4ad237a5c C#: Update expected test output 2022-02-02 19:25:30 +01:00
Tom Hvitved
d7eeb1fec8 C#: Use .NET 6 2022-02-02 19:25:30 +01:00
Arthur Baars
33b97f3e0c Update synchronized files 2022-02-02 13:30:45 +01:00
Michael Nebel
2c6e35f55e C#: Add more attribute testcases. 2022-02-01 14:06:45 +01:00
Michael Nebel
31a70a17a4 C#: Add attribute tests for delegate types. 2022-02-01 13:29:26 +01:00
Michael Nebel
8ee27be908 C#: Small change in the attribute elements test. We now require that the attribute should be in source code and not the attributable. 2022-02-01 13:29:26 +01:00
Michael Nebel
7d1d2e792c C#: Add specialized ql classes for each attribute kind and update AST printing. 2022-02-01 13:29:26 +01:00
Michael Nebel
5a6667efc5 C#: Update attribute test cases. 2022-02-01 13:29:26 +01:00
Nick Rolfe
990e07b986 Ruby/C#: add semmle.order attribute to edges in CFG tests 2022-01-31 20:08:24 +00:00
Michael Nebel
56ac99039f Merge pull request #7720 from michaelnebel/csharp/extended-prop-patterns
C#: Desugar property patterns that uses member access syntax.
2022-01-31 13:24:24 +01:00
Nick Rolfe
cd5010fe11 C#: sync changes from Ruby to improve ordering of graph test output 2022-01-27 15:34:01 +00:00
Tom Hvitved
99b9d4513b C#: Update expected test output after passing in --qltest in codeql test run 2022-01-26 10:33:00 +01:00
Michael Nebel
44cc044a3d C#: Add testcase for extended property patterns (to indicate that they are de-sugared correctly). 2022-01-25 15:13:11 +01:00
Michael Nebel
833e8e4f1d C#: Add some examples with the extended property pattern syntax. 2022-01-25 15:13:11 +01:00
Tom Hvitved
d7a91fdbe6 C#: Exclude extractor arguments from compilation_args relation 2022-01-25 15:09:29 +01:00
Tom Hvitved
06776d19ee Merge pull request #4949 from luchua-bc/cs/hash-without-salt
C#: Query to detect hash without salt
2022-01-25 09:04:23 +01:00
Tom Hvitved
fdd787b89c Merge pull request #7658 from hvitved/csharp/dataflow/no-negative-positions
C#: Get rid of negative parameter/argument data-flow positions
2022-01-25 09:01:44 +01:00
Harry Maclean
517f2d0823 Add optional results to InlineExpectationsTest
The idea behind optional results is that there may be instances where
each line of source code has many results and you don't want to annotate
all of them, but you still want to ensure that any annotations you do
have are correct.

This change makes that possible by exposing a new predicate
`hasOptionalResult`, which has the same signature as `hasResult`.

Results produced by `hasOptionalResult` will be matched against any
annotations, but the lack of a matching annotation will not cause a
failure.

We will use this in the inline tests for the API edge getASubclass,
because for each API path that uses getASubclass there is always a
shorter path that does not use it, and thus we can't use the normal
shortest-path matching approach that works for other API Graph tests.
2022-01-25 16:41:49 +13:00
Tom Hvitved
e3afcb1b06 C#: Add missing severity and update expected test output 2022-01-24 20:00:25 +01:00
Tom Hvitved
65e1c0ebc1 Merge remote-tracking branch 'upstream/main' into cs/hash-without-salt 2022-01-24 19:57:07 +01:00
yoff
a77a6ec864 Merge pull request #7684 from erik-krogh/patches
small refactorizations across CodeQL
2022-01-21 15:04:14 +01:00
Erik Krogh Kristensen
f500bccbe4 add explicit this to member call 2022-01-21 11:46:33 +01:00
Michael Nebel
e804922a2c C#: Add flow test case for with expressions on anonymous types. 2022-01-20 13:14:06 +01:00
Michael Nebel
97d9985e0b C#: Add support for flow via object initializer for anonymous types. 2022-01-20 13:12:19 +01:00
Michael Nebel
76a0853f5b C#: Add struct declaration and update line numbers for the existing test cases. 2022-01-20 10:23:57 +01:00
Michael Nebel
7d7ab58108 C#: Add flow test for record struct fields. 2022-01-20 09:58:02 +01:00
Michael Nebel
210bad6c29 C#: Add test case for with expressions for record structs, structs and anonymous types. 2022-01-20 09:58:02 +01:00
Michael Nebel
fc7f642734 C#: With expression examples for record structs, structs and anonymous types. 2022-01-20 09:58:02 +01:00
Michael Nebel
858aec3839 C#: Add test for source of the struct parameterless constructor(s). 2022-01-20 09:58:02 +01:00
Michael Nebel
073d2f2c75 C#: Add some example struct types, including one with a default constructor declarations. 2022-01-20 09:58:01 +01:00
Michael Nebel
547f492be0 Merge pull request #7577 from michaelnebel/csharp/line-pragma
C#: Make support for Line span pragma
2022-01-20 09:51:57 +01:00
Tom Hvitved
128682b59e C#: Replace Argument[-1] with Argument[Qualifier] in all flow summaries 2022-01-19 18:54:24 +01:00
Michael Nebel
2eea6ca5fd C#: Example record type with autogenerated Deconstruct method. 2022-01-19 11:04:53 +01:00
Michael Nebel
55f787bcae Merge pull request #7605 from michaelnebel/csharp/record-struct
C#: Support for record structs
2022-01-19 10:39:52 +01:00
Anders Schack-Mulligen
7b98ca9b0a C#: Adjust qltest expected output. 2022-01-18 10:36:52 +01:00
Michael Nebel
ac47c96f48 C#: Add Line span pragma test case. 2022-01-18 09:32:14 +01:00
Michael Nebel
8b048ca17e C#: Add line span pragma example. 2022-01-18 09:32:14 +01:00