Skip to content

Commit f17c670

Browse files
authored
Merge pull request #1814 from felicity-semmle/1.22/csharp-finalize-change-notes
C# 1.22: Finalize change notes
2 parents bd9bebc + 9ccb0af commit f17c670

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

change-notes/1.22/analysis-csharp.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
11
# Improvements to C# analysis
22

3+
The following changes in version 1.22 affect C# analysis in all applications.
4+
35
## Changes to existing queries
46

57
| **Query** | **Expected impact** | **Change** |
68
|------------------------------|------------------------|-----------------------------------|
7-
| Added lines (`cs/vcs/added-lines-per-file`) | No results | Query has been removed. |
8-
| Churned lines (`cs/vcs/churn-per-file`) | No results | Query has been removed. |
99
| Constant condition (`cs/constant-condition`) | Fewer false positive results | Results have been removed for default cases (`_`) in switch expressions. |
10-
| Defect filter | No results | Query has been removed. |
11-
| Defect from SVN | No results | Query has been removed. |
12-
| Deleted lines (`cs/vcs/deleted-lines-per-file`) | No results | Query has been removed. |
1310
| Dispose may not be called if an exception is thrown during execution (`cs/dispose-not-called-on-throw`) | Fewer false positive results | Results have been removed where an object is disposed both by a `using` statement and a `Dispose` call. |
14-
| Files edited in pairs | No results | Query has been removed. |
15-
| Filter: only files recently edited | No results | Query has been removed. |
16-
| Large files currently edited | No results | Query has been removed. |
17-
| Metric from SVN | No results | Query has been removed. |
18-
| Number of authors (version control) (`cs/vcs/authors-per-file`) | No results | Query has been removed. |
19-
| Number of file-level changes (`cs/vcs/commits-per-file`) | No results | Query has been removed. |
20-
| Number of co-committed files (`cs/vcs/co-commits-per-file`) | No results | Query has been removed. |
21-
| Number of file re-commits (`cs/vcs/recommits-per-file`) | No results | Query has been removed. |
22-
| Number of recent file changes (`cs/vcs/recent-commits-per-file`) | No results | Query has been removed. |
23-
| Number of authors | No results | Query has been removed. |
24-
| Number of commits | No results | Query has been removed. |
25-
| Poorly documented files with many authors | No results | Query has been removed. |
26-
| Recent activity | No results | Query has been removed. |
2711
| Unchecked return value (`cs/unchecked-return-value`) | Fewer false positive results | Method calls that are expression bodies of `void` callables (for example, the call to `Foo` in `void Bar() => Foo()`) are no longer considered to use the return value. |
2812

13+
## Removal of old queries
14+
15+
The following historic queries are no longer available in the distribution:
16+
17+
* Added lines (`cs/vcs/added-lines-per-file`)
18+
* Churned lines (`cs/vcs/churn-per-file`)
19+
* Defect filter
20+
* Defect from SVN
21+
* Deleted lines (`cs/vcs/deleted-lines-per-file`)
22+
* Files edited in pairs
23+
* Filter: only files recently edited
24+
* Large files currently edited
25+
* Metric from SVN
26+
* Number of authors (version control) (`cs/vcs/authors-per-file`)
27+
* Number of file-level changes (`cs/vcs/commits-per-file`)
28+
* Number of co-committed files (`cs/vcs/co-commits-per-file`)
29+
* Number of file re-commits (`cs/vcs/recommits-per-file`)
30+
* Number of recent file changes (`cs/vcs/recent-commits-per-file`)
31+
* Number of authors
32+
* Number of commits
33+
* Poorly documented files with many authors
34+
* Recent activity
35+
2936
## Changes to code extraction
3037

3138
* The following C# 8 features are now extracted:
@@ -34,20 +41,18 @@
3441

3542
## Changes to QL libraries
3643

37-
* The new class `AnnotatedType` models types with type annotations, including nullability information, return kinds (`ref` and `readonly ref`), and parameter kinds (`in`, `out`, and `ref`)
38-
- The new predicate `Assignable.getAnnotatedType()` gets the annotated type of an assignable (such as a variable or a property)
39-
- The new predicates `Callable.getAnnotatedReturnType()` and `DelegateType.getAnnotatedReturnType()` get the annotated type of the return value
40-
- The new predicate `ArrayType.getAnnotatedElementType()` gets the annotated type of the array element
41-
- The new predicate `ConstructedGeneric.getAnnotatedTypeArgument()` gets the annotated type of a type argument
42-
- The new predicate `TypeParameterConstraints.getAnAnnotatedTypeConstraint()` gets a type constraint with type annotations
43-
* The new class `SuppressNullableWarningExpr` models suppress-nullable-warning expressions such as `x!`
44-
* The data-flow library (and taint-tracking library) now supports flow through fields. All existing configurations will have field-flow enabled by default, but it can be disabled by adding `override int fieldFlowBranchLimit() { result = 0 }` to the configuration class. Field assignments, `this.Foo = x`, object initializers, `new C() { Foo = x }`, and field initializers `int Foo = 0` are supported.
44+
* The new class `AnnotatedType` models types with type annotations, including nullability information, return kinds (`ref` and `readonly ref`), and parameter kinds (`in`, `out`, and `ref`).
45+
- The new predicate `Assignable.getAnnotatedType()` gets the annotated type of an assignable (such as a variable or a property).
46+
- The new predicates `Callable.getAnnotatedReturnType()` and `DelegateType.getAnnotatedReturnType()` gets the annotated type of the return value.
47+
- The new predicate `ArrayType.getAnnotatedElementType()` gets the annotated type of the array element.
48+
- The new predicate `ConstructedGeneric.getAnnotatedTypeArgument()` gets the annotated type of a type argument.
49+
- The new predicate `TypeParameterConstraints.getAnAnnotatedTypeConstraint()` gets a type constraint with type annotations.
50+
* The new class `SuppressNullableWarningExpr` models suppress-nullable-warning expressions such as `x!`.
51+
* The data-flow and taint-tracking libraries now support flow through fields. All existing configurations will have field-flow enabled by default, but it can be disabled by adding `override int fieldFlowBranchLimit() { result = 0 }` to the configuration class. Field assignments, `this.Foo = x`, object initializers, `new C() { Foo = x }`, and field initializers `int Foo = 0` are supported.
4552
* The possibility of specifying barrier edges using
4653
`isBarrierEdge`/`isSanitizerEdge` in data-flow and taint-tracking
4754
configurations has been replaced with the option of specifying in- and
4855
out-barriers on nodes by overriding `isBarrierIn`/`isSanitizerIn` and
4956
`isBarrierOut`/`isSanitizerOut`. This should be simpler to use effectively,
5057
as it does not require knowledge about the actual edges used internally by
5158
the library.
52-
53-
## Changes to autobuilder

0 commit comments

Comments
 (0)