mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge branch 'main' into redsun82/rust-default-doc-signature
This commit is contained in:
@@ -15,7 +15,7 @@ repos:
|
|||||||
- id: clang-format
|
- id: clang-format
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-autopep8
|
- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||||
rev: v1.6.0
|
rev: v2.0.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: autopep8
|
- id: autopep8
|
||||||
files: ^misc/codegen/.*\.py
|
files: ^misc/codegen/.*\.py
|
||||||
|
|||||||
38
Cargo.lock
generated
38
Cargo.lock
generated
@@ -96,6 +96,16 @@ version = "1.0.87"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8"
|
checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "argfile"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0a1cc0ba69de57db40674c66f7cf2caee3981ddef084388482c95c0e2133e5e8"
|
||||||
|
dependencies = [
|
||||||
|
"fs-err",
|
||||||
|
"os_str_bytes",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arrayvec"
|
name = "arrayvec"
|
||||||
version = "0.7.6"
|
version = "0.7.6"
|
||||||
@@ -360,6 +370,7 @@ name = "codeql-rust"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"argfile",
|
||||||
"clap",
|
"clap",
|
||||||
"codeql-extractor",
|
"codeql-extractor",
|
||||||
"figment",
|
"figment",
|
||||||
@@ -374,6 +385,7 @@ dependencies = [
|
|||||||
"ra_ap_project_model",
|
"ra_ap_project_model",
|
||||||
"ra_ap_syntax",
|
"ra_ap_syntax",
|
||||||
"ra_ap_vfs",
|
"ra_ap_vfs",
|
||||||
|
"rust-extractor-macros",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_with",
|
"serde_with",
|
||||||
"stderrlog",
|
"stderrlog",
|
||||||
@@ -643,6 +655,15 @@ version = "1.0.7"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fs-err"
|
||||||
|
version = "2.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fsevent-sys"
|
name = "fsevent-sys"
|
||||||
version = "4.1.0"
|
version = "4.1.0"
|
||||||
@@ -1064,6 +1085,15 @@ version = "11.1.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9"
|
checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "os_str_bytes"
|
||||||
|
version = "7.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7ac44c994af577c799b1b4bd80dc214701e349873ad894d6cdf96f4f7526e0b9"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "overload"
|
name = "overload"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@@ -1875,6 +1905,14 @@ dependencies = [
|
|||||||
"text-size",
|
"text-size",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rust-extractor-macros"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-hash"
|
name = "rustc-hash"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ members = [
|
|||||||
"shared/tree-sitter-extractor",
|
"shared/tree-sitter-extractor",
|
||||||
"ruby/extractor",
|
"ruby/extractor",
|
||||||
"rust/extractor",
|
"rust/extractor",
|
||||||
|
"rust/extractor/macros",
|
||||||
]
|
]
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ r.from_cargo(
|
|||||||
"//:Cargo.toml",
|
"//:Cargo.toml",
|
||||||
"//ruby/extractor:Cargo.toml",
|
"//ruby/extractor:Cargo.toml",
|
||||||
"//rust/extractor:Cargo.toml",
|
"//rust/extractor:Cargo.toml",
|
||||||
|
"//rust/extractor/macros:Cargo.toml",
|
||||||
"//shared/tree-sitter-extractor:Cargo.toml",
|
"//shared/tree-sitter-extractor:Cargo.toml",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,27 @@
|
|||||||
|
## 2.0.0
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
|
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
||||||
|
* Deleted the deprecated `hasQualifiedName` and `isDefined` predicates from the `Declaration` class, use `hasGlobalName` and `hasDefinition` respectively instead.
|
||||||
|
* Deleted the `getFullSignature` predicate from the `Function` class, use `getIdentityString(Declaration)` from `semmle.code.cpp.Print` instead.
|
||||||
|
* Deleted the deprecated `freeCall` predicate from `Alloc.qll`. Use `DeallocationExpr` instead.
|
||||||
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
|
* Deleted the deprecated `getFieldExpr` predicate from `ClassAggregateLiteral`, use `getAFieldExpr` instead.
|
||||||
|
* Deleted the deprecated `getElementExpr` predicate from `ArrayOrVectorAggregateLiteral`, use `getAnElementExpr` instead.
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
* Added a class `C11GenericExpr` to represent C11 generic selection expressions. The generic selection is represented as a `Conversion` on the expression that will be selected.
|
||||||
|
* Added subclasses of `BuiltInOperations` for the `__is_scoped_enum`, `__is_trivially_equality_comparable`, and `__is_trivially_relocatable` builtin operations.
|
||||||
|
* Added a subclass of `Expr` for `__datasizeof` expressions.
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* Added a data flow model for `swap` member functions, which were previously modeled as taint tracking functions. This change improves the precision of queries where flow through `swap` member functions might affect the results.
|
||||||
|
* Added a data flow model for `realloc`-like functions, which were previously modeled as a taint tracking functions. This change improves the precision of queries where flow through `realloc`-like functions might affect the results.
|
||||||
|
|
||||||
## 1.4.2
|
## 1.4.2
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
category: feature
|
|
||||||
---
|
|
||||||
* Added subclasses of `BuiltInOperations` for the `__is_scoped_enum`, `__is_trivially_equality_comparable`, and `__is_trivially_relocatable` builtin operations.
|
|
||||||
* Added a subclass of `Expr` for `__datasizeof` expressions.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: feature
|
|
||||||
---
|
|
||||||
* Added a class `C11GenericExpr` to represent C11 generic selection expressions. The generic selection is represented as a `Conversion` on the expression that will be selected.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: minorAnalysis
|
|
||||||
---
|
|
||||||
* Added a data flow model for `realloc`-like functions, which were previously modeled as a taint tracking functions. This change improves the precision of queries where flow through `realloc`-like functions might affect the results.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: minorAnalysis
|
|
||||||
---
|
|
||||||
* Added a data flow model for `swap` member functions, which were previously modeled as taint tracking functions. This change improves the precision of queries where flow through `swap` member functions might affect the results.
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
## 2.0.0
|
||||||
category: breaking
|
|
||||||
---
|
### Breaking Changes
|
||||||
|
|
||||||
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
||||||
* Deleted the deprecated `hasQualifiedName` and `isDefined` predicates from the `Declaration` class, use `hasGlobalName` and `hasDefinition` respectively instead.
|
* Deleted the deprecated `hasQualifiedName` and `isDefined` predicates from the `Declaration` class, use `hasGlobalName` and `hasDefinition` respectively instead.
|
||||||
@@ -9,3 +10,14 @@ category: breaking
|
|||||||
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
* Deleted the deprecated `getFieldExpr` predicate from `ClassAggregateLiteral`, use `getAFieldExpr` instead.
|
* Deleted the deprecated `getFieldExpr` predicate from `ClassAggregateLiteral`, use `getAFieldExpr` instead.
|
||||||
* Deleted the deprecated `getElementExpr` predicate from `ArrayOrVectorAggregateLiteral`, use `getAnElementExpr` instead.
|
* Deleted the deprecated `getElementExpr` predicate from `ArrayOrVectorAggregateLiteral`, use `getAnElementExpr` instead.
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
* Added a class `C11GenericExpr` to represent C11 generic selection expressions. The generic selection is represented as a `Conversion` on the expression that will be selected.
|
||||||
|
* Added subclasses of `BuiltInOperations` for the `__is_scoped_enum`, `__is_trivially_equality_comparable`, and `__is_trivially_relocatable` builtin operations.
|
||||||
|
* Added a subclass of `Expr` for `__datasizeof` expressions.
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* Added a data flow model for `swap` member functions, which were previously modeled as taint tracking functions. This change improves the precision of queries where flow through `swap` member functions might affect the results.
|
||||||
|
* Added a data flow model for `realloc`-like functions, which were previously modeled as a taint tracking functions. This change improves the precision of queries where flow through `realloc`-like functions might affect the results.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.4.2
|
lastReleaseVersion: 2.0.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/cpp-all
|
name: codeql/cpp-all
|
||||||
version: 1.4.3-dev
|
version: 2.0.1-dev
|
||||||
groups: cpp
|
groups: cpp
|
||||||
dbscheme: semmlecode.cpp.dbscheme
|
dbscheme: semmlecode.cpp.dbscheme
|
||||||
extractor: cpp
|
extractor: cpp
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
## 1.2.3
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* Removed false positives caused by buffer accesses in unreachable code.
|
||||||
|
* Removed false positives caused by inconsistent type checking.
|
||||||
|
* Add modeling of C functions that don't throw, thereby increasing the precision of the `cpp/incorrect-allocation-error-handling` ("Incorrect allocation-error handling") query. The query now produces additional true positives.
|
||||||
|
|
||||||
## 1.2.2
|
## 1.2.2
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: minorAnalysis
|
|
||||||
---
|
|
||||||
* Add modeling of C functions that don't throw, thereby increasing the precision of the `cpp/incorrect-allocation-error-handling` ("Incorrect allocation-error handling") query. The query now produces additional true positives.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
category: minorAnalysis
|
|
||||||
---
|
|
||||||
* Removed false positives caused by buffer accesses in unreachable code
|
|
||||||
* Removed false positives caused by inconsistent type checking
|
|
||||||
7
cpp/ql/src/change-notes/released/1.2.3.md
Normal file
7
cpp/ql/src/change-notes/released/1.2.3.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
## 1.2.3
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* Removed false positives caused by buffer accesses in unreachable code
|
||||||
|
* Removed false positives caused by inconsistent type checking
|
||||||
|
* Add modeling of C functions that don't throw, thereby increasing the precision of the `cpp/incorrect-allocation-error-handling` ("Incorrect allocation-error handling") query. The query now produces additional true positives.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.2.2
|
lastReleaseVersion: 1.2.3
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/cpp-queries
|
name: codeql/cpp-queries
|
||||||
version: 1.2.3-dev
|
version: 1.2.4-dev
|
||||||
groups:
|
groups:
|
||||||
- cpp
|
- cpp
|
||||||
- queries
|
- queries
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PopulateAttributes();
|
||||||
PopulateModifiers(trapFile);
|
PopulateModifiers(trapFile);
|
||||||
BindComments();
|
BindComments();
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.7.25
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
|
|
||||||
## 1.7.24
|
## 1.7.24
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.7.25
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.7.24
|
lastReleaseVersion: 1.7.25
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/csharp-solorigate-all
|
name: codeql/csharp-solorigate-all
|
||||||
version: 1.7.25-dev
|
version: 1.7.26-dev
|
||||||
groups:
|
groups:
|
||||||
- csharp
|
- csharp
|
||||||
- solorigate
|
- solorigate
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.7.25
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
|
|
||||||
## 1.7.24
|
## 1.7.24
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.7.25
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.7.24
|
lastReleaseVersion: 1.7.25
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/csharp-solorigate-queries
|
name: codeql/csharp-solorigate-queries
|
||||||
version: 1.7.25-dev
|
version: 1.7.26-dev
|
||||||
groups:
|
groups:
|
||||||
- csharp
|
- csharp
|
||||||
- solorigate
|
- solorigate
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
## 2.0.0
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
|
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
||||||
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* Parameters of public methods in abstract controller-like classes are now considered remote flow sources.
|
||||||
|
* The reported location of `partial` methods has been changed from the definition to the implementation part.
|
||||||
|
|
||||||
## 1.2.0
|
## 1.2.0
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: minorAnalysis
|
|
||||||
---
|
|
||||||
* Parameters of public methods in abstract controller-like classes are now considered remote flow sources.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: minorAnalysis
|
|
||||||
---
|
|
||||||
* The reported location of `partial` methods has been changed from the definition to the implementation part.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
category: minorAnalysis
|
||||||
|
---
|
||||||
|
* C#: Add extractor support for attributes on indexers.
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
---
|
## 2.0.0
|
||||||
category: breaking
|
|
||||||
---
|
### Breaking Changes
|
||||||
|
|
||||||
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
||||||
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* Parameters of public methods in abstract controller-like classes are now considered remote flow sources.
|
||||||
|
* The reported location of `partial` methods has been changed from the definition to the implementation part.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.2.0
|
lastReleaseVersion: 2.0.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/csharp-all
|
name: codeql/csharp-all
|
||||||
version: 1.2.1-dev
|
version: 2.0.1-dev
|
||||||
groups: csharp
|
groups: csharp
|
||||||
dbscheme: semmlecode.csharp.dbscheme
|
dbscheme: semmlecode.csharp.dbscheme
|
||||||
extractor: csharp
|
extractor: csharp
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
|
|
||||||
## 1.0.7
|
## 1.0.7
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
3
csharp/ql/src/change-notes/released/1.0.8.md
Normal file
3
csharp/ql/src/change-notes/released/1.0.8.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.0.7
|
lastReleaseVersion: 1.0.8
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/csharp-queries
|
name: codeql/csharp-queries
|
||||||
version: 1.0.8-dev
|
version: 1.0.9-dev
|
||||||
groups:
|
groups:
|
||||||
- csharp
|
- csharp
|
||||||
- queries
|
- queries
|
||||||
|
|||||||
@@ -82,32 +82,34 @@ arguments
|
|||||||
| attributes.cs:102:8:102:19 | [My3(...)] | 0 | attributes.cs:102:21:102:21 | 4 |
|
| attributes.cs:102:8:102:19 | [My3(...)] | 0 | attributes.cs:102:21:102:21 | 4 |
|
||||||
| attributes.cs:107:6:107:17 | [My3(...)] | 0 | attributes.cs:107:19:107:19 | 5 |
|
| attributes.cs:107:6:107:17 | [My3(...)] | 0 | attributes.cs:107:19:107:19 | 5 |
|
||||||
| attributes.cs:108:14:108:25 | [return: My3(...)] | 0 | attributes.cs:108:27:108:27 | 6 |
|
| attributes.cs:108:14:108:25 | [return: My3(...)] | 0 | attributes.cs:108:27:108:27 | 6 |
|
||||||
| attributes.cs:113:10:113:21 | [My3(...)] | 0 | attributes.cs:113:23:113:23 | 7 |
|
| attributes.cs:111:6:111:17 | [My3(...)] | 0 | attributes.cs:111:19:111:20 | 15 |
|
||||||
| attributes.cs:114:18:114:29 | [return: My3(...)] | 0 | attributes.cs:114:31:114:31 | 8 |
|
| attributes.cs:114:10:114:21 | [My3(...)] | 0 | attributes.cs:114:23:114:23 | 7 |
|
||||||
| attributes.cs:117:18:117:29 | [My3(...)] | 0 | attributes.cs:117:31:117:31 | 9 |
|
| attributes.cs:115:18:115:29 | [return: My3(...)] | 0 | attributes.cs:115:31:115:31 | 8 |
|
||||||
| attributes.cs:118:17:118:28 | [My3(...)] | 0 | attributes.cs:118:30:118:31 | 10 |
|
| attributes.cs:118:18:118:29 | [My3(...)] | 0 | attributes.cs:118:31:118:31 | 9 |
|
||||||
| attributes.cs:125:18:125:29 | [My3(...)] | 0 | attributes.cs:125:31:125:32 | 11 |
|
| attributes.cs:119:17:119:28 | [My3(...)] | 0 | attributes.cs:119:30:119:31 | 10 |
|
||||||
| attributes.cs:126:18:126:29 | [return: My3(...)] | 0 | attributes.cs:126:31:126:32 | 12 |
|
| attributes.cs:124:6:124:17 | [My3(...)] | 0 | attributes.cs:124:19:124:20 | 16 |
|
||||||
| attributes.cs:129:10:129:21 | [My3(...)] | 0 | attributes.cs:129:23:129:24 | 13 |
|
| attributes.cs:127:18:127:29 | [My3(...)] | 0 | attributes.cs:127:31:127:32 | 11 |
|
||||||
| attributes.cs:130:17:130:28 | [My3(...)] | 0 | attributes.cs:130:30:130:31 | 14 |
|
| attributes.cs:128:18:128:29 | [return: My3(...)] | 0 | attributes.cs:128:31:128:32 | 12 |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 0 | attributes.cs:142:13:142:15 | "a" |
|
| attributes.cs:131:10:131:21 | [My3(...)] | 0 | attributes.cs:131:23:131:24 | 13 |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 1 | attributes.cs:142:18:142:20 | "b" |
|
| attributes.cs:132:17:132:28 | [My3(...)] | 0 | attributes.cs:132:30:132:31 | 14 |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 2 | attributes.cs:142:23:142:23 | 1 |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 0 | attributes.cs:144:13:144:15 | "a" |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 3 | attributes.cs:142:26:142:26 | 2 |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 1 | attributes.cs:144:18:144:20 | "b" |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 4 | attributes.cs:142:29:142:29 | 3 |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 2 | attributes.cs:144:23:144:23 | 1 |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 0 | attributes.cs:145:17:145:19 | "a" |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 3 | attributes.cs:144:26:144:26 | 2 |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 1 | attributes.cs:145:26:145:28 | "b" |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 4 | attributes.cs:144:29:144:29 | 3 |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 2 | attributes.cs:145:31:145:31 | 1 |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 0 | attributes.cs:147:17:147:19 | "a" |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 3 | attributes.cs:145:34:145:34 | 2 |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 1 | attributes.cs:147:26:147:28 | "b" |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 4 | attributes.cs:145:37:145:37 | 3 |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 2 | attributes.cs:147:31:147:31 | 1 |
|
||||||
| attributes.cs:148:6:148:11 | [Params(...)] | 0 | attributes.cs:148:35:148:37 | "a" |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 3 | attributes.cs:147:34:147:34 | 2 |
|
||||||
| attributes.cs:148:6:148:11 | [Params(...)] | 1 | attributes.cs:148:26:148:28 | "b" |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 4 | attributes.cs:147:37:147:37 | 3 |
|
||||||
| attributes.cs:148:6:148:11 | [Params(...)] | 2 | attributes.cs:148:19:148:19 | 1 |
|
| attributes.cs:150:6:150:11 | [Params(...)] | 0 | attributes.cs:150:35:150:37 | "a" |
|
||||||
| attributes.cs:151:6:151:11 | [Params(...)] | 0 | attributes.cs:151:45:151:47 | "a" |
|
| attributes.cs:150:6:150:11 | [Params(...)] | 1 | attributes.cs:150:26:150:28 | "b" |
|
||||||
| attributes.cs:151:6:151:11 | [Params(...)] | 1 | attributes.cs:151:36:151:38 | "b" |
|
| attributes.cs:150:6:150:11 | [Params(...)] | 2 | attributes.cs:150:19:150:19 | 1 |
|
||||||
| attributes.cs:151:6:151:11 | [Params(...)] | 2 | attributes.cs:151:19:151:29 | array creation of type Int32[] |
|
| attributes.cs:153:6:153:11 | [Params(...)] | 0 | attributes.cs:153:45:153:47 | "a" |
|
||||||
| attributes.cs:155:2:155:13 | [Experimental(...)] | 0 | attributes.cs:155:15:155:37 | "MyExperimentalClassId" |
|
| attributes.cs:153:6:153:11 | [Params(...)] | 1 | attributes.cs:153:36:153:38 | "b" |
|
||||||
| attributes.cs:158:6:158:17 | [Experimental(...)] | 0 | attributes.cs:158:19:158:42 | "MyExperimentalMethodId" |
|
| attributes.cs:153:6:153:11 | [Params(...)] | 2 | attributes.cs:153:19:153:29 | array creation of type Int32[] |
|
||||||
|
| attributes.cs:157:2:157:13 | [Experimental(...)] | 0 | attributes.cs:157:15:157:37 | "MyExperimentalClassId" |
|
||||||
|
| attributes.cs:160:6:160:17 | [Experimental(...)] | 0 | attributes.cs:160:19:160:42 | "MyExperimentalMethodId" |
|
||||||
constructorArguments
|
constructorArguments
|
||||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 1 |
|
| Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 1 |
|
||||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 3 |
|
| Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 3 |
|
||||||
@@ -180,32 +182,34 @@ constructorArguments
|
|||||||
| attributes.cs:102:8:102:19 | [My3(...)] | 0 | attributes.cs:102:21:102:21 | 4 |
|
| attributes.cs:102:8:102:19 | [My3(...)] | 0 | attributes.cs:102:21:102:21 | 4 |
|
||||||
| attributes.cs:107:6:107:17 | [My3(...)] | 0 | attributes.cs:107:19:107:19 | 5 |
|
| attributes.cs:107:6:107:17 | [My3(...)] | 0 | attributes.cs:107:19:107:19 | 5 |
|
||||||
| attributes.cs:108:14:108:25 | [return: My3(...)] | 0 | attributes.cs:108:27:108:27 | 6 |
|
| attributes.cs:108:14:108:25 | [return: My3(...)] | 0 | attributes.cs:108:27:108:27 | 6 |
|
||||||
| attributes.cs:113:10:113:21 | [My3(...)] | 0 | attributes.cs:113:23:113:23 | 7 |
|
| attributes.cs:111:6:111:17 | [My3(...)] | 0 | attributes.cs:111:19:111:20 | 15 |
|
||||||
| attributes.cs:114:18:114:29 | [return: My3(...)] | 0 | attributes.cs:114:31:114:31 | 8 |
|
| attributes.cs:114:10:114:21 | [My3(...)] | 0 | attributes.cs:114:23:114:23 | 7 |
|
||||||
| attributes.cs:117:18:117:29 | [My3(...)] | 0 | attributes.cs:117:31:117:31 | 9 |
|
| attributes.cs:115:18:115:29 | [return: My3(...)] | 0 | attributes.cs:115:31:115:31 | 8 |
|
||||||
| attributes.cs:118:17:118:28 | [My3(...)] | 0 | attributes.cs:118:30:118:31 | 10 |
|
| attributes.cs:118:18:118:29 | [My3(...)] | 0 | attributes.cs:118:31:118:31 | 9 |
|
||||||
| attributes.cs:125:18:125:29 | [My3(...)] | 0 | attributes.cs:125:31:125:32 | 11 |
|
| attributes.cs:119:17:119:28 | [My3(...)] | 0 | attributes.cs:119:30:119:31 | 10 |
|
||||||
| attributes.cs:126:18:126:29 | [return: My3(...)] | 0 | attributes.cs:126:31:126:32 | 12 |
|
| attributes.cs:124:6:124:17 | [My3(...)] | 0 | attributes.cs:124:19:124:20 | 16 |
|
||||||
| attributes.cs:129:10:129:21 | [My3(...)] | 0 | attributes.cs:129:23:129:24 | 13 |
|
| attributes.cs:127:18:127:29 | [My3(...)] | 0 | attributes.cs:127:31:127:32 | 11 |
|
||||||
| attributes.cs:130:17:130:28 | [My3(...)] | 0 | attributes.cs:130:30:130:31 | 14 |
|
| attributes.cs:128:18:128:29 | [return: My3(...)] | 0 | attributes.cs:128:31:128:32 | 12 |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 0 | attributes.cs:142:13:142:15 | "a" |
|
| attributes.cs:131:10:131:21 | [My3(...)] | 0 | attributes.cs:131:23:131:24 | 13 |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 1 | attributes.cs:142:18:142:20 | "b" |
|
| attributes.cs:132:17:132:28 | [My3(...)] | 0 | attributes.cs:132:30:132:31 | 14 |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 2 | attributes.cs:142:23:142:23 | 1 |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 0 | attributes.cs:144:13:144:15 | "a" |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 3 | attributes.cs:142:26:142:26 | 2 |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 1 | attributes.cs:144:18:144:20 | "b" |
|
||||||
| attributes.cs:142:6:142:11 | [Params(...)] | 4 | attributes.cs:142:29:142:29 | 3 |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 2 | attributes.cs:144:23:144:23 | 1 |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 0 | attributes.cs:145:17:145:19 | "a" |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 3 | attributes.cs:144:26:144:26 | 2 |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 1 | attributes.cs:145:26:145:28 | "b" |
|
| attributes.cs:144:6:144:11 | [Params(...)] | 4 | attributes.cs:144:29:144:29 | 3 |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 2 | attributes.cs:145:31:145:31 | 1 |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 0 | attributes.cs:147:17:147:19 | "a" |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 3 | attributes.cs:145:34:145:34 | 2 |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 1 | attributes.cs:147:26:147:28 | "b" |
|
||||||
| attributes.cs:145:6:145:11 | [Params(...)] | 4 | attributes.cs:145:37:145:37 | 3 |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 2 | attributes.cs:147:31:147:31 | 1 |
|
||||||
| attributes.cs:148:6:148:11 | [Params(...)] | 0 | attributes.cs:148:35:148:37 | "a" |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 3 | attributes.cs:147:34:147:34 | 2 |
|
||||||
| attributes.cs:148:6:148:11 | [Params(...)] | 1 | attributes.cs:148:26:148:28 | "b" |
|
| attributes.cs:147:6:147:11 | [Params(...)] | 4 | attributes.cs:147:37:147:37 | 3 |
|
||||||
| attributes.cs:148:6:148:11 | [Params(...)] | 2 | attributes.cs:148:19:148:19 | 1 |
|
| attributes.cs:150:6:150:11 | [Params(...)] | 0 | attributes.cs:150:35:150:37 | "a" |
|
||||||
| attributes.cs:151:6:151:11 | [Params(...)] | 0 | attributes.cs:151:45:151:47 | "a" |
|
| attributes.cs:150:6:150:11 | [Params(...)] | 1 | attributes.cs:150:26:150:28 | "b" |
|
||||||
| attributes.cs:151:6:151:11 | [Params(...)] | 1 | attributes.cs:151:36:151:38 | "b" |
|
| attributes.cs:150:6:150:11 | [Params(...)] | 2 | attributes.cs:150:19:150:19 | 1 |
|
||||||
| attributes.cs:151:6:151:11 | [Params(...)] | 2 | attributes.cs:151:19:151:29 | array creation of type Int32[] |
|
| attributes.cs:153:6:153:11 | [Params(...)] | 0 | attributes.cs:153:45:153:47 | "a" |
|
||||||
| attributes.cs:155:2:155:13 | [Experimental(...)] | 0 | attributes.cs:155:15:155:37 | "MyExperimentalClassId" |
|
| attributes.cs:153:6:153:11 | [Params(...)] | 1 | attributes.cs:153:36:153:38 | "b" |
|
||||||
| attributes.cs:158:6:158:17 | [Experimental(...)] | 0 | attributes.cs:158:19:158:42 | "MyExperimentalMethodId" |
|
| attributes.cs:153:6:153:11 | [Params(...)] | 2 | attributes.cs:153:19:153:29 | array creation of type Int32[] |
|
||||||
|
| attributes.cs:157:2:157:13 | [Experimental(...)] | 0 | attributes.cs:157:15:157:37 | "MyExperimentalClassId" |
|
||||||
|
| attributes.cs:160:6:160:17 | [Experimental(...)] | 0 | attributes.cs:160:19:160:42 | "MyExperimentalMethodId" |
|
||||||
namedArguments
|
namedArguments
|
||||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] |
|
| Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] |
|
||||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] |
|
| Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] |
|
||||||
|
|||||||
@@ -24,20 +24,22 @@
|
|||||||
| attributes.cs:103:17:103:27 | My2Delegate | attributes.cs:102:8:102:19 | [My3(...)] | My3Attribute |
|
| attributes.cs:103:17:103:27 | My2Delegate | attributes.cs:102:8:102:19 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:109:32:109:32 | + | attributes.cs:107:6:107:17 | [My3(...)] | My3Attribute |
|
| attributes.cs:109:32:109:32 | + | attributes.cs:107:6:107:17 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:109:32:109:32 | + | attributes.cs:108:14:108:25 | [return: My3(...)] | My3Attribute |
|
| attributes.cs:109:32:109:32 | + | attributes.cs:108:14:108:25 | [return: My3(...)] | My3Attribute |
|
||||||
| attributes.cs:115:9:115:11 | get_Item | attributes.cs:113:10:113:21 | [My3(...)] | My3Attribute |
|
| attributes.cs:112:16:112:19 | Item | attributes.cs:111:6:111:17 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:115:9:115:11 | get_Item | attributes.cs:114:18:114:29 | [return: My3(...)] | My3Attribute |
|
| attributes.cs:116:9:116:11 | get_Item | attributes.cs:114:10:114:21 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:119:9:119:11 | set_Item | attributes.cs:117:18:117:29 | [My3(...)] | My3Attribute |
|
| attributes.cs:116:9:116:11 | get_Item | attributes.cs:115:18:115:29 | [return: My3(...)] | My3Attribute |
|
||||||
| attributes.cs:119:9:119:11 | value | attributes.cs:118:17:118:28 | [My3(...)] | My3Attribute |
|
| attributes.cs:120:9:120:11 | set_Item | attributes.cs:118:18:118:29 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:127:9:127:11 | get_Prop1 | attributes.cs:125:18:125:29 | [My3(...)] | My3Attribute |
|
| attributes.cs:120:9:120:11 | value | attributes.cs:119:17:119:28 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:127:9:127:11 | get_Prop1 | attributes.cs:126:18:126:29 | [return: My3(...)] | My3Attribute |
|
| attributes.cs:125:16:125:20 | Prop1 | attributes.cs:124:6:124:17 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:131:9:131:11 | set_Prop1 | attributes.cs:129:10:129:21 | [My3(...)] | My3Attribute |
|
| attributes.cs:129:9:129:11 | get_Prop1 | attributes.cs:127:18:127:29 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:131:9:131:11 | value | attributes.cs:130:17:130:28 | [My3(...)] | My3Attribute |
|
| attributes.cs:129:9:129:11 | get_Prop1 | attributes.cs:128:18:128:29 | [return: My3(...)] | My3Attribute |
|
||||||
| attributes.cs:143:17:143:18 | M1 | attributes.cs:142:6:142:11 | [Params(...)] | Class1+ParamsAttribute |
|
| attributes.cs:133:9:133:11 | set_Prop1 | attributes.cs:131:10:131:21 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:146:17:146:18 | M2 | attributes.cs:145:6:145:11 | [Params(...)] | Class1+ParamsAttribute |
|
| attributes.cs:133:9:133:11 | value | attributes.cs:132:17:132:28 | [My3(...)] | My3Attribute |
|
||||||
| attributes.cs:149:17:149:18 | M3 | attributes.cs:148:6:148:11 | [Params(...)] | Class1+ParamsAttribute |
|
| attributes.cs:145:17:145:18 | M1 | attributes.cs:144:6:144:11 | [Params(...)] | Class1+ParamsAttribute |
|
||||||
| attributes.cs:152:17:152:18 | M4 | attributes.cs:151:6:151:11 | [Params(...)] | Class1+ParamsAttribute |
|
| attributes.cs:148:17:148:18 | M2 | attributes.cs:147:6:147:11 | [Params(...)] | Class1+ParamsAttribute |
|
||||||
| attributes.cs:156:14:156:32 | MyExperimentalClass | attributes.cs:155:2:155:13 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute |
|
| attributes.cs:151:17:151:18 | M3 | attributes.cs:150:6:150:11 | [Params(...)] | Class1+ParamsAttribute |
|
||||||
| attributes.cs:159:17:159:36 | MyExperimentalMethod | attributes.cs:158:6:158:17 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute |
|
| attributes.cs:154:17:154:18 | M4 | attributes.cs:153:6:153:11 | [Params(...)] | Class1+ParamsAttribute |
|
||||||
|
| attributes.cs:158:14:158:32 | MyExperimentalClass | attributes.cs:157:2:157:13 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute |
|
||||||
|
| attributes.cs:161:17:161:36 | MyExperimentalMethod | attributes.cs:160:6:160:17 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute |
|
||||||
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:11:12:11:24 | [assembly: AssemblyTitle(...)] | System.Reflection.AssemblyTitleAttribute |
|
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:11:12:11:24 | [assembly: AssemblyTitle(...)] | System.Reflection.AssemblyTitleAttribute |
|
||||||
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:12:12:12:30 | [assembly: AssemblyDescription(...)] | System.Reflection.AssemblyDescriptionAttribute |
|
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:12:12:12:30 | [assembly: AssemblyDescription(...)] | System.Reflection.AssemblyDescriptionAttribute |
|
||||||
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:13:12:13:32 | [assembly: AssemblyConfiguration(...)] | System.Reflection.AssemblyConfigurationAttribute |
|
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:13:12:13:32 | [assembly: AssemblyConfiguration(...)] | System.Reflection.AssemblyConfigurationAttribute |
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
| attributes.cs:156:14:156:32 | MyExperimentalClass | attributes.cs:155:2:155:13 | [Experimental(...)] | MyExperimentalClassId |
|
| attributes.cs:158:14:158:32 | MyExperimentalClass | attributes.cs:157:2:157:13 | [Experimental(...)] | MyExperimentalClassId |
|
||||||
| attributes.cs:159:17:159:36 | MyExperimentalMethod | attributes.cs:158:6:158:17 | [Experimental(...)] | MyExperimentalMethodId |
|
| attributes.cs:161:17:161:36 | MyExperimentalMethod | attributes.cs:160:6:160:17 | [Experimental(...)] | MyExperimentalMethodId |
|
||||||
|
|||||||
@@ -338,136 +338,144 @@ attributes.cs:
|
|||||||
# 109| 1: [Parameter] b
|
# 109| 1: [Parameter] b
|
||||||
# 109| -1: [TypeMention] MyAttributeUsage
|
# 109| -1: [TypeMention] MyAttributeUsage
|
||||||
# 109| 4: [IntLiteral] 0
|
# 109| 4: [IntLiteral] 0
|
||||||
# 111| 6: [Indexer] Item
|
# 112| 6: [Indexer] Item
|
||||||
# 111| -1: [TypeMention] int
|
# 112| -1: [TypeMention] int
|
||||||
|
#-----| 0: (Attributes)
|
||||||
|
# 111| 1: [DefaultAttribute] [My3(...)]
|
||||||
|
# 111| -1: [TypeMention] My3Attribute
|
||||||
|
# 111| 0: [IntLiteral] 15
|
||||||
#-----| 1: (Parameters)
|
#-----| 1: (Parameters)
|
||||||
# 111| 0: [Parameter] x
|
# 112| 0: [Parameter] x
|
||||||
# 111| -1: [TypeMention] int
|
# 112| -1: [TypeMention] int
|
||||||
# 115| 3: [Getter] get_Item
|
# 116| 3: [Getter] get_Item
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 113| 1: [DefaultAttribute] [My3(...)]
|
# 114| 1: [DefaultAttribute] [My3(...)]
|
||||||
# 113| -1: [TypeMention] My3Attribute
|
|
||||||
# 113| 0: [IntLiteral] 7
|
|
||||||
# 114| 2: [ReturnAttribute] [return: My3(...)]
|
|
||||||
# 114| -1: [TypeMention] My3Attribute
|
# 114| -1: [TypeMention] My3Attribute
|
||||||
# 114| 0: [IntLiteral] 8
|
# 114| 0: [IntLiteral] 7
|
||||||
|
# 115| 2: [ReturnAttribute] [return: My3(...)]
|
||||||
|
# 115| -1: [TypeMention] My3Attribute
|
||||||
|
# 115| 0: [IntLiteral] 8
|
||||||
#-----| 2: (Parameters)
|
#-----| 2: (Parameters)
|
||||||
# 111| 0: [Parameter] x
|
# 112| 0: [Parameter] x
|
||||||
# 115| 4: [BlockStmt] {...}
|
# 116| 4: [BlockStmt] {...}
|
||||||
# 115| 0: [ReturnStmt] return ...;
|
# 116| 0: [ReturnStmt] return ...;
|
||||||
# 115| 0: [AddExpr] ... + ...
|
# 116| 0: [AddExpr] ... + ...
|
||||||
# 115| 0: [ParameterAccess] access to parameter x
|
# 116| 0: [ParameterAccess] access to parameter x
|
||||||
# 115| 1: [IntLiteral] 1
|
# 116| 1: [IntLiteral] 1
|
||||||
# 119| 4: [Setter] set_Item
|
# 120| 4: [Setter] set_Item
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 117| 1: [DefaultAttribute] [My3(...)]
|
# 118| 1: [DefaultAttribute] [My3(...)]
|
||||||
# 117| -1: [TypeMention] My3Attribute
|
# 118| -1: [TypeMention] My3Attribute
|
||||||
# 117| 0: [IntLiteral] 9
|
# 118| 0: [IntLiteral] 9
|
||||||
#-----| 2: (Parameters)
|
#-----| 2: (Parameters)
|
||||||
# 111| 0: [Parameter] x
|
# 112| 0: [Parameter] x
|
||||||
# 119| 1: [Parameter] value
|
# 120| 1: [Parameter] value
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 118| 1: [DefaultAttribute] [My3(...)]
|
# 119| 1: [DefaultAttribute] [My3(...)]
|
||||||
# 118| -1: [TypeMention] My3Attribute
|
# 119| -1: [TypeMention] My3Attribute
|
||||||
# 118| 0: [IntLiteral] 10
|
# 119| 0: [IntLiteral] 10
|
||||||
# 119| 4: [BlockStmt] {...}
|
# 120| 4: [BlockStmt] {...}
|
||||||
# 119| 0: [ReturnStmt] return ...;
|
# 120| 0: [ReturnStmt] return ...;
|
||||||
# 122| 7: [Field] p
|
# 123| 7: [Field] p
|
||||||
# 122| -1: [TypeMention] int
|
|
||||||
# 123| 8: [Property] Prop1
|
|
||||||
# 123| -1: [TypeMention] int
|
# 123| -1: [TypeMention] int
|
||||||
# 127| 3: [Getter] get_Prop1
|
# 125| 8: [Property] Prop1
|
||||||
|
# 125| -1: [TypeMention] int
|
||||||
|
#-----| 0: (Attributes)
|
||||||
|
# 124| 1: [DefaultAttribute] [My3(...)]
|
||||||
|
# 124| -1: [TypeMention] My3Attribute
|
||||||
|
# 124| 0: [IntLiteral] 16
|
||||||
|
# 129| 3: [Getter] get_Prop1
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 125| 1: [DefaultAttribute] [My3(...)]
|
# 127| 1: [DefaultAttribute] [My3(...)]
|
||||||
# 125| -1: [TypeMention] My3Attribute
|
# 127| -1: [TypeMention] My3Attribute
|
||||||
# 125| 0: [IntLiteral] 11
|
# 127| 0: [IntLiteral] 11
|
||||||
# 126| 2: [ReturnAttribute] [return: My3(...)]
|
# 128| 2: [ReturnAttribute] [return: My3(...)]
|
||||||
# 126| -1: [TypeMention] My3Attribute
|
# 128| -1: [TypeMention] My3Attribute
|
||||||
# 126| 0: [IntLiteral] 12
|
# 128| 0: [IntLiteral] 12
|
||||||
# 127| 4: [BlockStmt] {...}
|
# 129| 4: [BlockStmt] {...}
|
||||||
# 127| 0: [ReturnStmt] return ...;
|
# 129| 0: [ReturnStmt] return ...;
|
||||||
# 127| 0: [FieldAccess] access to field p
|
# 129| 0: [FieldAccess] access to field p
|
||||||
# 131| 4: [Setter] set_Prop1
|
# 133| 4: [Setter] set_Prop1
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 129| 1: [DefaultAttribute] [My3(...)]
|
# 131| 1: [DefaultAttribute] [My3(...)]
|
||||||
# 129| -1: [TypeMention] My3Attribute
|
# 131| -1: [TypeMention] My3Attribute
|
||||||
# 129| 0: [IntLiteral] 13
|
# 131| 0: [IntLiteral] 13
|
||||||
#-----| 2: (Parameters)
|
#-----| 2: (Parameters)
|
||||||
# 131| 0: [Parameter] value
|
# 133| 0: [Parameter] value
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 130| 1: [DefaultAttribute] [My3(...)]
|
# 132| 1: [DefaultAttribute] [My3(...)]
|
||||||
# 130| -1: [TypeMention] My3Attribute
|
# 132| -1: [TypeMention] My3Attribute
|
||||||
# 130| 0: [IntLiteral] 14
|
# 132| 0: [IntLiteral] 14
|
||||||
# 131| 4: [BlockStmt] {...}
|
# 133| 4: [BlockStmt] {...}
|
||||||
# 131| 0: [ExprStmt] ...;
|
# 133| 0: [ExprStmt] ...;
|
||||||
# 131| 0: [AssignExpr] ... = ...
|
# 133| 0: [AssignExpr] ... = ...
|
||||||
# 131| 0: [FieldAccess] access to field p
|
# 133| 0: [FieldAccess] access to field p
|
||||||
# 131| 1: [ParameterAccess] access to parameter value
|
# 133| 1: [ParameterAccess] access to parameter value
|
||||||
# 135| [Class] Class1
|
# 137| [Class] Class1
|
||||||
# 137| 5: [Class] ParamsAttribute
|
# 139| 5: [Class] ParamsAttribute
|
||||||
#-----| 3: (Base types)
|
#-----| 3: (Base types)
|
||||||
# 137| 0: [TypeMention] Attribute
|
# 139| 0: [TypeMention] Attribute
|
||||||
# 139| 4: [InstanceConstructor] ParamsAttribute
|
# 141| 4: [InstanceConstructor] ParamsAttribute
|
||||||
#-----| 2: (Parameters)
|
#-----| 2: (Parameters)
|
||||||
# 139| 0: [Parameter] s1
|
# 141| 0: [Parameter] s1
|
||||||
# 139| -1: [TypeMention] string
|
# 141| -1: [TypeMention] string
|
||||||
# 139| 1: [Parameter] s2
|
# 141| 1: [Parameter] s2
|
||||||
# 139| -1: [TypeMention] string
|
# 141| -1: [TypeMention] string
|
||||||
# 139| 2: [Parameter] args
|
# 141| 2: [Parameter] args
|
||||||
# 139| -1: [TypeMention] Int32[]
|
# 141| -1: [TypeMention] Int32[]
|
||||||
# 139| 1: [TypeMention] int
|
# 141| 1: [TypeMention] int
|
||||||
# 139| 4: [BlockStmt] {...}
|
# 141| 4: [BlockStmt] {...}
|
||||||
# 143| 6: [Method] M1
|
# 145| 6: [Method] M1
|
||||||
# 143| -1: [TypeMention] Void
|
# 145| -1: [TypeMention] Void
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 142| 1: [DefaultAttribute] [Params(...)]
|
# 144| 1: [DefaultAttribute] [Params(...)]
|
||||||
# 142| -1: [TypeMention] ParamsAttribute
|
# 144| -1: [TypeMention] ParamsAttribute
|
||||||
# 142| 0: [StringLiteralUtf16] "a"
|
# 144| 0: [StringLiteralUtf16] "a"
|
||||||
# 142| 1: [StringLiteralUtf16] "b"
|
# 144| 1: [StringLiteralUtf16] "b"
|
||||||
# 142| 2: [IntLiteral] 1
|
# 144| 2: [IntLiteral] 1
|
||||||
# 142| 3: [IntLiteral] 2
|
# 144| 3: [IntLiteral] 2
|
||||||
# 142| 4: [IntLiteral] 3
|
# 144| 4: [IntLiteral] 3
|
||||||
# 143| 4: [BlockStmt] {...}
|
# 145| 4: [BlockStmt] {...}
|
||||||
# 146| 7: [Method] M2
|
# 148| 7: [Method] M2
|
||||||
# 146| -1: [TypeMention] Void
|
# 148| -1: [TypeMention] Void
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 145| 1: [DefaultAttribute] [Params(...)]
|
# 147| 1: [DefaultAttribute] [Params(...)]
|
||||||
# 145| -1: [TypeMention] ParamsAttribute
|
# 147| -1: [TypeMention] ParamsAttribute
|
||||||
# 145| 0: [StringLiteralUtf16] "a"
|
# 147| 0: [StringLiteralUtf16] "a"
|
||||||
# 145| 1: [StringLiteralUtf16] "b"
|
# 147| 1: [StringLiteralUtf16] "b"
|
||||||
# 145| 2: [IntLiteral] 1
|
# 147| 2: [IntLiteral] 1
|
||||||
# 145| 3: [IntLiteral] 2
|
# 147| 3: [IntLiteral] 2
|
||||||
# 145| 4: [IntLiteral] 3
|
# 147| 4: [IntLiteral] 3
|
||||||
# 146| 4: [BlockStmt] {...}
|
# 148| 4: [BlockStmt] {...}
|
||||||
# 149| 8: [Method] M3
|
# 151| 8: [Method] M3
|
||||||
# 149| -1: [TypeMention] Void
|
# 151| -1: [TypeMention] Void
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 148| 1: [DefaultAttribute] [Params(...)]
|
# 150| 1: [DefaultAttribute] [Params(...)]
|
||||||
# 148| -1: [TypeMention] ParamsAttribute
|
# 150| -1: [TypeMention] ParamsAttribute
|
||||||
# 148| 0: [StringLiteralUtf16] "a"
|
# 150| 0: [StringLiteralUtf16] "a"
|
||||||
# 148| 1: [StringLiteralUtf16] "b"
|
# 150| 1: [StringLiteralUtf16] "b"
|
||||||
# 148| 2: [IntLiteral] 1
|
# 150| 2: [IntLiteral] 1
|
||||||
# 149| 4: [BlockStmt] {...}
|
# 151| 4: [BlockStmt] {...}
|
||||||
# 152| 9: [Method] M4
|
# 154| 9: [Method] M4
|
||||||
# 152| -1: [TypeMention] Void
|
# 154| -1: [TypeMention] Void
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 151| 1: [DefaultAttribute] [Params(...)]
|
# 153| 1: [DefaultAttribute] [Params(...)]
|
||||||
# 151| -1: [TypeMention] ParamsAttribute
|
# 153| -1: [TypeMention] ParamsAttribute
|
||||||
# 151| 0: [StringLiteralUtf16] "a"
|
# 153| 0: [StringLiteralUtf16] "a"
|
||||||
# 151| 1: [StringLiteralUtf16] "b"
|
# 153| 1: [StringLiteralUtf16] "b"
|
||||||
# 151| 2: [ArrayCreation] array creation of type Int32[]
|
# 153| 2: [ArrayCreation] array creation of type Int32[]
|
||||||
# 151| -1: [ArrayInitializer] { ..., ... }
|
# 153| -1: [ArrayInitializer] { ..., ... }
|
||||||
# 151| 0: [IntLiteral] 1
|
# 153| 0: [IntLiteral] 1
|
||||||
# 152| 4: [BlockStmt] {...}
|
# 154| 4: [BlockStmt] {...}
|
||||||
# 156| [Class] MyExperimentalClass
|
# 158| [Class] MyExperimentalClass
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 155| 1: [DefaultAttribute] [Experimental(...)]
|
# 157| 1: [DefaultAttribute] [Experimental(...)]
|
||||||
# 155| -1: [TypeMention] ExperimentalAttribute
|
# 157| -1: [TypeMention] ExperimentalAttribute
|
||||||
# 155| 0: [StringLiteralUtf16] "MyExperimentalClassId"
|
# 157| 0: [StringLiteralUtf16] "MyExperimentalClassId"
|
||||||
# 159| 5: [Method] MyExperimentalMethod
|
# 161| 5: [Method] MyExperimentalMethod
|
||||||
# 159| -1: [TypeMention] Void
|
# 161| -1: [TypeMention] Void
|
||||||
#-----| 0: (Attributes)
|
#-----| 0: (Attributes)
|
||||||
# 158| 1: [DefaultAttribute] [Experimental(...)]
|
# 160| 1: [DefaultAttribute] [Experimental(...)]
|
||||||
# 158| -1: [TypeMention] ExperimentalAttribute
|
# 160| -1: [TypeMention] ExperimentalAttribute
|
||||||
# 158| 0: [StringLiteralUtf16] "MyExperimentalMethodId"
|
# 160| 0: [StringLiteralUtf16] "MyExperimentalMethodId"
|
||||||
# 159| 4: [BlockStmt] {...}
|
# 161| 4: [BlockStmt] {...}
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ public class MyAttributeUsage
|
|||||||
[return: My3Attribute(6)]
|
[return: My3Attribute(6)]
|
||||||
public static int operator +(MyAttributeUsage a, MyAttributeUsage b) => 0;
|
public static int operator +(MyAttributeUsage a, MyAttributeUsage b) => 0;
|
||||||
|
|
||||||
|
[My3Attribute(15)]
|
||||||
public int this[int x]
|
public int this[int x]
|
||||||
{
|
{
|
||||||
[My3Attribute(7)]
|
[My3Attribute(7)]
|
||||||
@@ -120,6 +121,7 @@ public class MyAttributeUsage
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int p;
|
private int p;
|
||||||
|
[My3Attribute(16)]
|
||||||
public int Prop1
|
public int Prop1
|
||||||
{
|
{
|
||||||
[method: My3Attribute(11)]
|
[method: My3Attribute(11)]
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
.. _codeql-cli-2.18.4:
|
||||||
|
|
||||||
|
==========================
|
||||||
|
CodeQL 2.18.4 (2024-09-12)
|
||||||
|
==========================
|
||||||
|
|
||||||
|
.. contents:: Contents
|
||||||
|
:depth: 2
|
||||||
|
:local:
|
||||||
|
:backlinks: none
|
||||||
|
|
||||||
|
This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the `code scanning section on the GitHub blog <https://github.blog/tag/code-scanning/>`__, `relevant GitHub Changelog updates <https://github.blog/changelog/label/code-scanning/>`__, `changes in the CodeQL extension for Visual Studio Code <https://marketplace.visualstudio.com/items/GitHub.vscode-codeql/changelog>`__, and the `CodeQL Action changelog <https://github.com/github/codeql-action/blob/main/CHANGELOG.md>`__.
|
||||||
|
|
||||||
|
Security Coverage
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
CodeQL 2.18.4 runs a total of 425 security queries when configured with the Default suite (covering 164 CWE). The Extended suite enables an additional 128 queries (covering 34 more CWE).
|
||||||
|
|
||||||
|
CodeQL CLI
|
||||||
|
----------
|
||||||
|
|
||||||
|
New Features
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* C# support for :code:`build-mode: none` is now out of beta, and generally available.
|
||||||
|
* Go 1.23 is now supported.
|
||||||
|
|
||||||
|
Language Libraries
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Major Analysis Improvements
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Golang
|
||||||
|
""""""
|
||||||
|
|
||||||
|
* Go 1.23 is now supported.
|
||||||
|
|
||||||
|
New Features
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
C#
|
||||||
|
""
|
||||||
|
|
||||||
|
* C# support for :code:`build-mode: none` is now out of beta, and generally available.
|
||||||
@@ -11,6 +11,7 @@ A list of queries for each suite and language `is available here <https://docs.g
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
codeql-cli-2.18.4
|
||||||
codeql-cli-2.18.3
|
codeql-cli-2.18.3
|
||||||
codeql-cli-2.18.2
|
codeql-cli-2.18.2
|
||||||
codeql-cli-2.18.1
|
codeql-cli-2.18.1
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
|
|
||||||
## 1.0.7
|
## 1.0.7
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
3
go/ql/consistency-queries/change-notes/released/1.0.8.md
Normal file
3
go/ql/consistency-queries/change-notes/released/1.0.8.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.0.7
|
lastReleaseVersion: 1.0.8
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql-go-consistency-queries
|
name: codeql-go-consistency-queries
|
||||||
version: 1.0.8-dev
|
version: 1.0.9-dev
|
||||||
groups:
|
groups:
|
||||||
- go
|
- go
|
||||||
- queries
|
- queries
|
||||||
|
|||||||
@@ -1,3 +1,27 @@
|
|||||||
|
## 2.0.0
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* When a function or type has more than one anonymous type parameters, they were mistakenly being treated as the same type parameter. This has now been fixed.
|
||||||
|
* Local source models for reading and parsing environment variables have been added for the following libraries:
|
||||||
|
* `os`
|
||||||
|
* `syscall`
|
||||||
|
* `github.com/caarlos0/env`
|
||||||
|
* `github.com/gobuffalo/envy`
|
||||||
|
* `github.com/hashicorp/go-envparse`
|
||||||
|
* `github.com/joho/godotenv`
|
||||||
|
* `github.com/kelseyhightower/envconfig`
|
||||||
|
* Local source models have been added for the APIs which open files in the `io/fs`, `io/ioutil` and `os` packages in the Go standard library. You can optionally include threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see [Analyzing your code with CodeQL queries](https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data>) and [Customizing your advanced setup for code scanning](https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models).
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Golang vendor directories not at the root of a repository are now correctly excluded from the baseline Go file count. This means code coverage information will be more accurate.
|
||||||
|
|
||||||
## 1.2.0
|
## 1.2.0
|
||||||
|
|
||||||
### Major Analysis Improvements
|
### Major Analysis Improvements
|
||||||
@@ -6,18 +30,6 @@
|
|||||||
|
|
||||||
## 1.1.5
|
## 1.1.5
|
||||||
|
|
||||||
### Minor Analysis Improvements
|
|
||||||
|
|
||||||
* Local source models for reading and parsing environment variables have been added for the following libraries:
|
|
||||||
- os
|
|
||||||
- syscall
|
|
||||||
- github.com/caarlos0/env
|
|
||||||
- github.com/gobuffalo/envy
|
|
||||||
- github.com/hashicorp/go-envparse
|
|
||||||
- github.com/joho/godotenv
|
|
||||||
- github.com/kelseyhightower/envconfig
|
|
||||||
* Local source models have been added for the APIs which open files in the `io/fs`, `io/ioutil` and `os` packages in the Go standard library. You can optionally include threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see [Analyzing your code with CodeQL queries](https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data>) and [Customizing your advanced setup for code scanning](https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models).
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* Fixed an issue where `io/ioutil.WriteFile`'s non-path arguments incorrectly generated `go/path-injection` alerts when untrusted data was written to a file, or controlled the file's mode.
|
* Fixed an issue where `io/ioutil.WriteFile`'s non-path arguments incorrectly generated `go/path-injection` alerts when untrusted data was written to a file, or controlled the file's mode.
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: fix
|
|
||||||
---
|
|
||||||
* Golang vendor directories not at the root of a repository are now correctly excluded from the baseline Go file count. This means code coverage information will be more accurate.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
category: breaking
|
|
||||||
---
|
|
||||||
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
|
||||||
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: minorAnalysis
|
|
||||||
---
|
|
||||||
* When a function or type has more than one anonymous type parameters, they were mistakenly being treated as the same type parameter. This has now been fixed.
|
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
---
|
## 2.0.0
|
||||||
category: minorAnalysis
|
|
||||||
---
|
### Breaking Changes
|
||||||
|
|
||||||
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
|
|
||||||
|
### Minor Analysis Improvements
|
||||||
|
|
||||||
|
* When a function or type has more than one anonymous type parameters, they were mistakenly being treated as the same type parameter. This has now been fixed.
|
||||||
* Local source models for reading and parsing environment variables have been added for the following libraries:
|
* Local source models for reading and parsing environment variables have been added for the following libraries:
|
||||||
* os
|
* os
|
||||||
* syscall
|
* syscall
|
||||||
@@ -10,3 +17,7 @@ category: minorAnalysis
|
|||||||
* github.com/joho/godotenv
|
* github.com/joho/godotenv
|
||||||
* github.com/kelseyhightower/envconfig
|
* github.com/kelseyhightower/envconfig
|
||||||
* Local source models have been added for the APIs which open files in the `io/fs`, `io/ioutil` and `os` packages in the Go standard library. You can optionally include threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see [Analyzing your code with CodeQL queries](https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data>) and [Customizing your advanced setup for code scanning](https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models).
|
* Local source models have been added for the APIs which open files in the `io/fs`, `io/ioutil` and `os` packages in the Go standard library. You can optionally include threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see [Analyzing your code with CodeQL queries](https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data>) and [Customizing your advanced setup for code scanning](https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models).
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Golang vendor directories not at the root of a repository are now correctly excluded from the baseline Go file count. This means code coverage information will be more accurate.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.2.0
|
lastReleaseVersion: 2.0.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/go-all
|
name: codeql/go-all
|
||||||
version: 1.2.1-dev
|
version: 2.0.1-dev
|
||||||
groups: go
|
groups: go
|
||||||
dbscheme: go.dbscheme
|
dbscheme: go.dbscheme
|
||||||
extractor: go
|
extractor: go
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
|
|
||||||
## 1.0.7
|
## 1.0.7
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
3
go/ql/src/change-notes/released/1.0.8.md
Normal file
3
go/ql/src/change-notes/released/1.0.8.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.0.7
|
lastReleaseVersion: 1.0.8
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/go-queries
|
name: codeql/go-queries
|
||||||
version: 1.0.8-dev
|
version: 1.0.9-dev
|
||||||
groups:
|
groups:
|
||||||
- go
|
- go
|
||||||
- queries
|
- queries
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
|
|
||||||
## 1.0.7
|
## 1.0.7
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
3
java/ql/automodel/src/change-notes/released/1.0.8.md
Normal file
3
java/ql/automodel/src/change-notes/released/1.0.8.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.0.7
|
lastReleaseVersion: 1.0.8
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/java-automodel-queries
|
name: codeql/java-automodel-queries
|
||||||
version: 1.0.8-dev
|
version: 1.0.9-dev
|
||||||
groups:
|
groups:
|
||||||
- java
|
- java
|
||||||
- automodel
|
- automodel
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
## 4.0.0
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
* Deleted the deprecated `ProcessBuilderConstructor`, `MethodProcessBuilderCommand`, and `MethodRuntimeExec` from `JDK.qll`.
|
||||||
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
|
* Deleted the deprecated `getURI` predicate from `CamelJavaDslToDecl` and `SpringCamelXmlToElement`, use `getUri` instead.
|
||||||
|
* Deleted the deprecated `ExecCallable` class from `ExternalProcess.qll`.
|
||||||
|
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
||||||
|
* Deleted the deprecated `PathCreation.qll` file.
|
||||||
|
* Deleted the deprecated `WebviewDubuggingEnabledQuery.qll` file.
|
||||||
|
|
||||||
|
### Major Analysis Improvements
|
||||||
|
|
||||||
|
* When a method exists as source code, we will no longer use a models-as-data (MaD) model of that method. This primarily affects query results when the analysis includes generated models for the source code being analysed.
|
||||||
|
|
||||||
## 3.0.2
|
## 3.0.2
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: majorAnalysis
|
|
||||||
---
|
|
||||||
* A generated (Models as Data) summary model is no longer used, if there exists a source code alternative. This primarily affects the analysis, when the analysis includes generated models for the source code being analysed.
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
## 4.0.0
|
||||||
category: breaking
|
|
||||||
---
|
### Breaking Changes
|
||||||
|
|
||||||
* Deleted the deprecated `ProcessBuilderConstructor`, `MethodProcessBuilderCommand`, and `MethodRuntimeExec` from `JDK.qll`.
|
* Deleted the deprecated `ProcessBuilderConstructor`, `MethodProcessBuilderCommand`, and `MethodRuntimeExec` from `JDK.qll`.
|
||||||
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration<explorationLimit>` instead.
|
||||||
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`.
|
||||||
@@ -9,3 +10,7 @@ category: breaking
|
|||||||
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`.
|
||||||
* Deleted the deprecated `PathCreation.qll` file.
|
* Deleted the deprecated `PathCreation.qll` file.
|
||||||
* Deleted the deprecated `WebviewDubuggingEnabledQuery.qll` file.
|
* Deleted the deprecated `WebviewDubuggingEnabledQuery.qll` file.
|
||||||
|
|
||||||
|
### Major Analysis Improvements
|
||||||
|
|
||||||
|
* A generated (Models as Data) summary model is no longer used, if there exists a source code alternative. This primarily affects the analysis, when the analysis includes generated models for the source code being analysed.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 3.0.2
|
lastReleaseVersion: 4.0.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/java-all
|
name: codeql/java-all
|
||||||
version: 3.0.3-dev
|
version: 4.0.1-dev
|
||||||
groups: java
|
groups: java
|
||||||
dbscheme: config/semmlecode.dbscheme
|
dbscheme: config/semmlecode.dbscheme
|
||||||
extractor: java
|
extractor: java
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.1.5
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
|
|
||||||
## 1.1.4
|
## 1.1.4
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
3
java/ql/src/change-notes/released/1.1.5.md
Normal file
3
java/ql/src/change-notes/released/1.1.5.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.1.5
|
||||||
|
|
||||||
|
No user-facing changes.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.1.4
|
lastReleaseVersion: 1.1.5
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/java-queries
|
name: codeql/java-queries
|
||||||
version: 1.1.5-dev
|
version: 1.1.6-dev
|
||||||
groups:
|
groups:
|
||||||
- java
|
- java
|
||||||
- queries
|
- queries
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
## 2.0.0
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
* Deleted the deprecated `isHTMLElement` and `getDOMName` predicates from the JSX library, use `isHtmlElement` and `getDomName` respectively instead.
|
||||||
|
* Deleted the deprecated `getPackageJSON` predicate from the `SourceMappingComment` class, use `SourceMappingComment` instead.
|
||||||
|
* Deleted many deprecated directives from the `Stmt.qll` file, use the `Directive::` module instead.
|
||||||
|
* Deleted the deprecated `YAMLNode`, `YAMLValue`, and `YAMLScalar` classes from the YAML libraries, use `YamlNode`, `YamlValue`, and `YamlScalar` respectively instead.
|
||||||
|
* Deleted the deprecated `getARouteHandlerExpr` predicate from `Connect.qll`, use `getARouteHandlerNode` instead.
|
||||||
|
* Deleted the deprecated `getGWTVersion` predicate from `GWT.qll`, use `getGwtVersion` instead.
|
||||||
|
* Deleted the deprecated `getOwnOptionsObject` predicate from `Vue.qll`, use `getOwnOptions().getASink()` instead.
|
||||||
|
|
||||||
|
### Major Analysis Improvements
|
||||||
|
|
||||||
|
* Added support for TypeScript 5.6.
|
||||||
|
|
||||||
## 1.1.4
|
## 1.1.4
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
category: majorAnalysis
|
|
||||||
---
|
|
||||||
* Added support for TypeScript 5.6.
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
## 2.0.0
|
||||||
category: breaking
|
|
||||||
---
|
### Breaking Changes
|
||||||
|
|
||||||
* Deleted the deprecated `isHTMLElement` and `getDOMName` predicates from the JSX library, use `isHtmlElement` and `getDomName` respectively instead.
|
* Deleted the deprecated `isHTMLElement` and `getDOMName` predicates from the JSX library, use `isHtmlElement` and `getDomName` respectively instead.
|
||||||
* Deleted the deprecated `getPackageJSON` predicate from the `SourceMappingComment` class, use `SourceMappingComment` instead.
|
* Deleted the deprecated `getPackageJSON` predicate from the `SourceMappingComment` class, use `SourceMappingComment` instead.
|
||||||
* Deleted many deprecated directives from the `Stmt.qll` file, use the `Directive::` module instead.
|
* Deleted many deprecated directives from the `Stmt.qll` file, use the `Directive::` module instead.
|
||||||
@@ -8,3 +9,7 @@ category: breaking
|
|||||||
* Deleted the deprecated `getARouteHandlerExpr` predicate from `Connect.qll`, use `getARouteHandlerNode` instead.
|
* Deleted the deprecated `getARouteHandlerExpr` predicate from `Connect.qll`, use `getARouteHandlerNode` instead.
|
||||||
* Deleted the deprecated `getGWTVersion` predicate from `GWT.qll`, use `getGwtVersion` instead.
|
* Deleted the deprecated `getGWTVersion` predicate from `GWT.qll`, use `getGwtVersion` instead.
|
||||||
* Deleted the deprecated `getOwnOptionsObject` predicate from `Vue.qll`, use `getOwnOptions().getASink()` instead.
|
* Deleted the deprecated `getOwnOptionsObject` predicate from `Vue.qll`, use `getOwnOptions().getASink()` instead.
|
||||||
|
|
||||||
|
### Major Analysis Improvements
|
||||||
|
|
||||||
|
* Added support for TypeScript 5.6.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.1.4
|
lastReleaseVersion: 2.0.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/javascript-all
|
name: codeql/javascript-all
|
||||||
version: 1.1.5-dev
|
version: 2.0.1-dev
|
||||||
groups: javascript
|
groups: javascript
|
||||||
dbscheme: semmlecode.javascript.dbscheme
|
dbscheme: semmlecode.javascript.dbscheme
|
||||||
extractor: javascript
|
extractor: javascript
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
## 1.2.0
|
||||||
|
|
||||||
|
### Major Analysis Improvements
|
||||||
|
|
||||||
|
- Added a new query (`js/actions/actions-artifact-leak`) to detect GitHub Actions artifacts that may leak the `GITHUB_TOKEN` token.
|
||||||
|
|
||||||
## 1.1.3
|
## 1.1.3
|
||||||
|
|
||||||
No user-facing changes.
|
No user-facing changes.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
## 1.2.0
|
||||||
category: majorAnalysis
|
|
||||||
---
|
### Major Analysis Improvements
|
||||||
|
|
||||||
- Added a new query (`js/actions/actions-artifact-leak`) to detect GitHub Actions artifacts that may leak the GITHUB_TOKEN token.
|
- Added a new query (`js/actions/actions-artifact-leak`) to detect GitHub Actions artifacts that may leak the GITHUB_TOKEN token.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
lastReleaseVersion: 1.1.3
|
lastReleaseVersion: 1.2.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: codeql/javascript-queries
|
name: codeql/javascript-queries
|
||||||
version: 1.1.4-dev
|
version: 1.2.1-dev
|
||||||
groups:
|
groups:
|
||||||
- javascript
|
- javascript
|
||||||
- queries
|
- queries
|
||||||
|
|||||||
@@ -2,18 +2,19 @@
|
|||||||
QL code generation
|
QL code generation
|
||||||
|
|
||||||
`generate(opts, renderer)` will generate in the library directory:
|
`generate(opts, renderer)` will generate in the library directory:
|
||||||
* generated/Raw.qll with thin class wrappers around DB types
|
* `generated/Raw.qll` with thin class wrappers around DB types
|
||||||
* generated/Synth.qll with the base algebraic datatypes for AST entities
|
* `generated/Synth.qll` with the base algebraic datatypes for AST entities
|
||||||
* generated/<group>/<Class>.qll with generated properties for each class
|
* `generated/<group>/<Class>.qll` with generated properties for each class
|
||||||
* if not already modified, a elements/<group>/<Class>.qll stub to customize the above classes
|
* if not already modified, an `elements/<group>/<Class>Impl.qll` stub to customize the above classes
|
||||||
* elements.qll importing all the above stubs
|
* `elements/<group>/<Class>.qll` that wraps the internal `<Class>Impl.qll` file in a public `final` class.
|
||||||
* if not already modified, a elements/<group>/<Class>Constructor.qll stub to customize the algebraic datatype
|
* `elements.qll` importing all the above public classes
|
||||||
|
* if not already modified, an `elements/<group>/<Class>Constructor.qll` stub to customize the algebraic datatype
|
||||||
characteristic predicate
|
characteristic predicate
|
||||||
* generated/SynthConstructors.qll importing all the above constructor stubs
|
* `generated/SynthConstructors.qll` importing all the above constructor stubs
|
||||||
* generated/PureSynthConstructors.qll importing constructor stubs for pure synthesized types (that is, not
|
* `generated/PureSynthConstructors.qll` importing constructor stubs for pure synthesized types (that is, not
|
||||||
corresponding to raw types)
|
corresponding to raw types)
|
||||||
Moreover in the test directory for each <Class> in <group> it will generate beneath the
|
Moreover in the test directory for each <Class> in <group> it will generate beneath the
|
||||||
extractor-tests/generated/<group>/<Class> directory either
|
`extractor-tests/generated/<group>/<Class>` directory either
|
||||||
* a `MISSING_SOURCE.txt` explanation file if no source is present, or
|
* a `MISSING_SOURCE.txt` explanation file if no source is present, or
|
||||||
* one `<Class>.ql` test query for all single properties and on `<Class>_<property>.ql` test query for each optional or
|
* one `<Class>.ql` test query for all single properties and on `<Class>_<property>.ql` test query for each optional or
|
||||||
repeated property
|
repeated property
|
||||||
@@ -164,6 +165,7 @@ def get_ql_class(cls: schema.Class, lookup: typing.Dict[str, schema.Class]) -> q
|
|||||||
return ql.Class(
|
return ql.Class(
|
||||||
name=cls.name,
|
name=cls.name,
|
||||||
bases=cls.bases,
|
bases=cls.bases,
|
||||||
|
bases_impl=[base + "Impl::" + base for base in cls.bases],
|
||||||
final=not cls.derived,
|
final=not cls.derived,
|
||||||
properties=properties,
|
properties=properties,
|
||||||
dir=pathlib.Path(cls.group or ""),
|
dir=pathlib.Path(cls.group or ""),
|
||||||
@@ -210,15 +212,17 @@ def get_import(file: pathlib.Path, root_dir: pathlib.Path):
|
|||||||
return str(stem).replace("/", ".")
|
return str(stem).replace("/", ".")
|
||||||
|
|
||||||
|
|
||||||
def get_types_used_by(cls: ql.Class) -> typing.Iterable[str]:
|
def get_types_used_by(cls: ql.Class, is_impl: bool) -> typing.Iterable[str]:
|
||||||
for b in cls.bases:
|
for b in cls.bases:
|
||||||
yield b.base
|
yield b.base + "Impl" if is_impl else b.base
|
||||||
for p in cls.properties:
|
for p in cls.properties:
|
||||||
yield p.type
|
yield p.type
|
||||||
|
if cls.root:
|
||||||
|
yield cls.name # used in `getResolveStep` and `resolve`
|
||||||
|
|
||||||
|
|
||||||
def get_classes_used_by(cls: ql.Class) -> typing.List[str]:
|
def get_classes_used_by(cls: ql.Class, is_impl: bool) -> typing.List[str]:
|
||||||
return sorted(set(t for t in get_types_used_by(cls) if t[0].isupper() and t != cls.name))
|
return sorted(set(t for t in get_types_used_by(cls, is_impl) if t[0].isupper() and (is_impl or t != cls.name)))
|
||||||
|
|
||||||
|
|
||||||
def format(codeql, files):
|
def format(codeql, files):
|
||||||
@@ -239,6 +243,10 @@ def _get_path(cls: schema.Class) -> pathlib.Path:
|
|||||||
return pathlib.Path(cls.group or "", cls.name).with_suffix(".qll")
|
return pathlib.Path(cls.group or "", cls.name).with_suffix(".qll")
|
||||||
|
|
||||||
|
|
||||||
|
def _get_path_impl(cls: schema.Class) -> pathlib.Path:
|
||||||
|
return pathlib.Path(cls.group or "", cls.name+"Impl").with_suffix(".qll")
|
||||||
|
|
||||||
|
|
||||||
def _get_all_properties(cls: schema.Class, lookup: typing.Dict[str, schema.Class],
|
def _get_all_properties(cls: schema.Class, lookup: typing.Dict[str, schema.Class],
|
||||||
already_seen: typing.Optional[typing.Set[int]] = None) -> \
|
already_seen: typing.Optional[typing.Set[int]] = None) -> \
|
||||||
typing.Iterable[typing.Tuple[schema.Class, schema.Property]]:
|
typing.Iterable[typing.Tuple[schema.Class, schema.Property]]:
|
||||||
@@ -315,11 +323,14 @@ def _get_stub(cls: schema.Class, base_import: str, generated_import_prefix: str)
|
|||||||
else:
|
else:
|
||||||
accessors = []
|
accessors = []
|
||||||
return ql.Stub(name=cls.name, base_import=base_import, import_prefix=generated_import_prefix,
|
return ql.Stub(name=cls.name, base_import=base_import, import_prefix=generated_import_prefix,
|
||||||
doc=cls.doc, synth_accessors=accessors,
|
doc=cls.doc, synth_accessors=accessors)
|
||||||
internal="ql_internal" in cls.pragmas)
|
|
||||||
|
|
||||||
|
|
||||||
_stub_qldoc_header = "// the following QLdoc is generated: if you need to edit it, do it in the schema file\n"
|
def _get_class_public(cls: schema.Class) -> ql.ClassPublic:
|
||||||
|
return ql.ClassPublic(name=cls.name, doc=cls.doc, internal="ql_internal" in cls.pragmas)
|
||||||
|
|
||||||
|
|
||||||
|
_stub_qldoc_header = "// the following QLdoc is generated: if you need to edit it, do it in the schema file\n "
|
||||||
|
|
||||||
_class_qldoc_re = re.compile(
|
_class_qldoc_re = re.compile(
|
||||||
rf"(?P<qldoc>(?:{re.escape(_stub_qldoc_header)})?/\*\*.*?\*/\s*|^\s*)(?:class\s+(?P<class>\w+))?",
|
rf"(?P<qldoc>(?:{re.escape(_stub_qldoc_header)})?/\*\*.*?\*/\s*|^\s*)(?:class\s+(?P<class>\w+))?",
|
||||||
@@ -330,13 +341,13 @@ def _patch_class_qldoc(cls: str, qldoc: str, stub_file: pathlib.Path):
|
|||||||
""" Replace or insert `qldoc` as the QLdoc of class `cls` in `stub_file` """
|
""" Replace or insert `qldoc` as the QLdoc of class `cls` in `stub_file` """
|
||||||
if not qldoc or not stub_file.exists():
|
if not qldoc or not stub_file.exists():
|
||||||
return
|
return
|
||||||
qldoc = "\n".join(l.rstrip() for l in qldoc.splitlines())
|
qldoc = "\n ".join(l.rstrip() for l in qldoc.splitlines())
|
||||||
with open(stub_file) as input:
|
with open(stub_file) as input:
|
||||||
contents = input.read()
|
contents = input.read()
|
||||||
for match in _class_qldoc_re.finditer(contents):
|
for match in _class_qldoc_re.finditer(contents):
|
||||||
if match["class"] == cls:
|
if match["class"] == cls:
|
||||||
qldoc_start, qldoc_end = match.span("qldoc")
|
qldoc_start, qldoc_end = match.span("qldoc")
|
||||||
contents = f"{contents[:qldoc_start]}{_stub_qldoc_header}{qldoc}\n{contents[qldoc_end:]}"
|
contents = f"{contents[:qldoc_start]}{_stub_qldoc_header}{qldoc}\n {contents[qldoc_end:]}"
|
||||||
tmp = stub_file.with_suffix(f"{stub_file.suffix}.bkp")
|
tmp = stub_file.with_suffix(f"{stub_file.suffix}.bkp")
|
||||||
with open(tmp, "w") as out:
|
with open(tmp, "w") as out:
|
||||||
out.write(contents)
|
out.write(contents)
|
||||||
@@ -370,6 +381,8 @@ def generate(opts, renderer):
|
|||||||
raise RootElementHasChildren(root)
|
raise RootElementHasChildren(root)
|
||||||
|
|
||||||
imports = {}
|
imports = {}
|
||||||
|
imports_impl = {}
|
||||||
|
classes_used_by = {}
|
||||||
generated_import_prefix = get_import(out, opts.root_dir)
|
generated_import_prefix = get_import(out, opts.root_dir)
|
||||||
registry = opts.generated_registry or pathlib.Path(
|
registry = opts.generated_registry or pathlib.Path(
|
||||||
os.path.commonpath((out, stub_out, test_out)), ".generated.list")
|
os.path.commonpath((out, stub_out, test_out)), ".generated.list")
|
||||||
@@ -382,24 +395,34 @@ def generate(opts, renderer):
|
|||||||
|
|
||||||
classes_by_dir_and_name = sorted(classes.values(), key=lambda cls: (cls.dir, cls.name))
|
classes_by_dir_and_name = sorted(classes.values(), key=lambda cls: (cls.dir, cls.name))
|
||||||
for c in classes_by_dir_and_name:
|
for c in classes_by_dir_and_name:
|
||||||
imports[c.name] = get_import(stub_out / c.path, opts.root_dir)
|
path = get_import(stub_out / c.path, opts.root_dir)
|
||||||
|
imports[c.name] = path
|
||||||
|
imports_impl[c.name + "Impl"] = path + "Impl"
|
||||||
|
|
||||||
for c in classes.values():
|
for c in classes.values():
|
||||||
qll = out / c.path.with_suffix(".qll")
|
qll = out / c.path.with_suffix(".qll")
|
||||||
c.imports = [imports[t] for t in get_classes_used_by(c)]
|
c.imports = [imports[t] if t in imports else imports_impl[t] +
|
||||||
|
"::Impl as " + t for t in get_classes_used_by(c, is_impl=True)]
|
||||||
|
classes_used_by[c.name] = get_classes_used_by(c, is_impl=False)
|
||||||
c.import_prefix = generated_import_prefix
|
c.import_prefix = generated_import_prefix
|
||||||
renderer.render(c, qll)
|
renderer.render(c, qll)
|
||||||
|
|
||||||
for c in data.classes.values():
|
for c in data.classes.values():
|
||||||
path = _get_path(c)
|
path = _get_path(c)
|
||||||
stub_file = stub_out / path
|
path_impl = _get_path_impl(c)
|
||||||
|
stub_file = stub_out / path_impl
|
||||||
base_import = get_import(out / path, opts.root_dir)
|
base_import = get_import(out / path, opts.root_dir)
|
||||||
stub = _get_stub(c, base_import, generated_import_prefix)
|
stub = _get_stub(c, base_import, generated_import_prefix)
|
||||||
|
|
||||||
if not renderer.is_customized_stub(stub_file):
|
if not renderer.is_customized_stub(stub_file):
|
||||||
renderer.render(stub, stub_file)
|
renderer.render(stub, stub_file)
|
||||||
else:
|
else:
|
||||||
qldoc = renderer.render_str(stub, template='ql_stub_class_qldoc')
|
qldoc = renderer.render_str(stub, template='ql_stub_class_qldoc')
|
||||||
_patch_class_qldoc(c.name, qldoc, stub_file)
|
_patch_class_qldoc(c.name, qldoc, stub_file)
|
||||||
|
class_public = _get_class_public(c)
|
||||||
|
class_public_file = stub_out / path
|
||||||
|
class_public.imports = [imports[t] for t in classes_used_by[c.name]]
|
||||||
|
renderer.render(class_public, class_public_file)
|
||||||
|
|
||||||
# for example path/to/elements -> path/to/elements.qll
|
# for example path/to/elements -> path/to/elements.qll
|
||||||
renderer.render(ql.ImportList([i for name, i in imports.items() if not classes[name].internal]),
|
renderer.render(ql.ImportList([i for name, i in imports.items() if not classes[name].internal]),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ def _get_type(t: str) -> str:
|
|||||||
case "int":
|
case "int":
|
||||||
return "usize"
|
return "usize"
|
||||||
case _ if t[0].isupper():
|
case _ if t[0].isupper():
|
||||||
return "trap::Label"
|
return f"trap::Label<{t}>"
|
||||||
case "boolean":
|
case "boolean":
|
||||||
assert False, "boolean unsupported"
|
assert False, "boolean unsupported"
|
||||||
case _:
|
case _:
|
||||||
@@ -57,6 +57,15 @@ def _get_properties(
|
|||||||
yield cls, p
|
yield cls, p
|
||||||
|
|
||||||
|
|
||||||
|
def _get_ancestors(
|
||||||
|
cls: schema.Class, lookup: dict[str, schema.Class]
|
||||||
|
) -> typing.Iterable[schema.Class]:
|
||||||
|
for b in cls.bases:
|
||||||
|
base = lookup[b]
|
||||||
|
yield base
|
||||||
|
yield from _get_ancestors(base, lookup)
|
||||||
|
|
||||||
|
|
||||||
class Processor:
|
class Processor:
|
||||||
def __init__(self, data: schema.Schema):
|
def __init__(self, data: schema.Schema):
|
||||||
self._classmap = data.classes
|
self._classmap = data.classes
|
||||||
@@ -69,14 +78,15 @@ class Processor:
|
|||||||
_get_field(c, p)
|
_get_field(c, p)
|
||||||
for c, p in _get_properties(cls, self._classmap)
|
for c, p in _get_properties(cls, self._classmap)
|
||||||
if "rust_skip" not in p.pragmas and not p.synth
|
if "rust_skip" not in p.pragmas and not p.synth
|
||||||
],
|
] if not cls.derived else [],
|
||||||
table_name=inflection.tableize(cls.name),
|
ancestors=sorted(set(a.name for a in _get_ancestors(cls, self._classmap))),
|
||||||
|
entry_table=inflection.tableize(cls.name) if not cls.derived else None,
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_classes(self):
|
def get_classes(self):
|
||||||
ret = {"": []}
|
ret = {"": []}
|
||||||
for k, cls in self._classmap.items():
|
for k, cls in self._classmap.items():
|
||||||
if not cls.synth and not cls.derived:
|
if not cls.synth:
|
||||||
ret.setdefault(cls.group, []).append(self._get_class(cls.name))
|
ret.setdefault(cls.group, []).append(self._get_class(cls.name))
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ class Class:
|
|||||||
|
|
||||||
name: str
|
name: str
|
||||||
bases: List[Base] = field(default_factory=list)
|
bases: List[Base] = field(default_factory=list)
|
||||||
|
bases_impl: List[Base] = field(default_factory=list)
|
||||||
final: bool = False
|
final: bool = False
|
||||||
properties: List[Property] = field(default_factory=list)
|
properties: List[Property] = field(default_factory=list)
|
||||||
dir: pathlib.Path = pathlib.Path()
|
dir: pathlib.Path = pathlib.Path()
|
||||||
@@ -114,7 +115,9 @@ class Class:
|
|||||||
hideable: bool = False
|
hideable: bool = False
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
self.bases = [Base(str(b), str(prev)) for b, prev in zip(self.bases, itertools.chain([""], self.bases))]
|
def get_bases(bases): return [Base(str(b), str(prev)) for b, prev in zip(bases, itertools.chain([""], bases))]
|
||||||
|
self.bases = get_bases(self.bases)
|
||||||
|
self.bases_impl = get_bases(self.bases_impl)
|
||||||
if self.properties:
|
if self.properties:
|
||||||
self.properties[0].first = True
|
self.properties[0].first = True
|
||||||
|
|
||||||
@@ -159,13 +162,26 @@ class Stub:
|
|||||||
base_import: str
|
base_import: str
|
||||||
import_prefix: str
|
import_prefix: str
|
||||||
synth_accessors: List[SynthUnderlyingAccessor] = field(default_factory=list)
|
synth_accessors: List[SynthUnderlyingAccessor] = field(default_factory=list)
|
||||||
internal: bool = False
|
|
||||||
doc: List[str] = field(default_factory=list)
|
doc: List[str] = field(default_factory=list)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_synth_accessors(self) -> bool:
|
def has_synth_accessors(self) -> bool:
|
||||||
return bool(self.synth_accessors)
|
return bool(self.synth_accessors)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_qldoc(self) -> bool:
|
||||||
|
return bool(self.doc)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class ClassPublic:
|
||||||
|
template: ClassVar = 'ql_class_public'
|
||||||
|
|
||||||
|
name: str
|
||||||
|
imports: List[str] = field(default_factory=list)
|
||||||
|
internal: bool = False
|
||||||
|
doc: List[str] = field(default_factory=list)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_qldoc(self) -> bool:
|
def has_qldoc(self) -> bool:
|
||||||
return bool(self.doc) or self.internal
|
return bool(self.doc) or self.internal
|
||||||
|
|||||||
@@ -110,12 +110,19 @@ class Field:
|
|||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
class Class:
|
class Class:
|
||||||
name: str
|
name: str
|
||||||
table_name: str
|
entry_table: str | None = None
|
||||||
fields: list[Field] = dataclasses.field(default_factory=list)
|
fields: list[Field] = dataclasses.field(default_factory=list)
|
||||||
|
ancestors: list[str] = dataclasses.field(default_factory=list)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def single_field_entries(self):
|
def is_entry(self) -> bool:
|
||||||
ret = {self.table_name: []}
|
return bool(self.entry_table)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def single_field_entries(self) -> dict[str, list[dict]]:
|
||||||
|
ret = {}
|
||||||
|
if self.is_entry:
|
||||||
|
ret[self.entry_table] = []
|
||||||
for f in self.fields:
|
for f in self.fields:
|
||||||
if f.is_single:
|
if f.is_single:
|
||||||
ret.setdefault(f.table_name, []).append(f)
|
ret.setdefault(f.table_name, []).append(f)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
{{#includes}}
|
{{#includes}}
|
||||||
|
|
||||||
// from {{src}}
|
// from {{src}}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
/**
|
/**
|
||||||
* This module provides the generated definition of `{{name}}`.
|
* This module provides the generated definition of `{{name}}`.
|
||||||
* INTERNAL: Do not import directly.
|
* INTERNAL: Do not import directly.
|
||||||
@@ -9,7 +9,9 @@ private import {{import_prefix}}.Raw
|
|||||||
{{#imports}}
|
{{#imports}}
|
||||||
import {{.}}
|
import {{.}}
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
{{#root}}
|
||||||
|
private class {{name}}Alias = {{name}};
|
||||||
|
{{/root}}
|
||||||
/**
|
/**
|
||||||
* INTERNAL: This module contains the fully generated definition of `{{name}}` and should not
|
* INTERNAL: This module contains the fully generated definition of `{{name}}` and should not
|
||||||
* be referenced directly.
|
* be referenced directly.
|
||||||
@@ -22,7 +24,7 @@ module Generated {
|
|||||||
* INTERNAL: Do not reference the `Generated::{{name}}` class directly.
|
* INTERNAL: Do not reference the `Generated::{{name}}` class directly.
|
||||||
* Use the subclass `{{name}}`, where the following predicates are available.
|
* Use the subclass `{{name}}`, where the following predicates are available.
|
||||||
*/
|
*/
|
||||||
class {{name}} extends Synth::T{{name}}{{#bases}}, {{.}}{{/bases}} {
|
class {{name}} extends Synth::T{{name}}{{#bases_impl}}, {{.}}{{/bases_impl}} {
|
||||||
{{#root}}
|
{{#root}}
|
||||||
/**
|
/**
|
||||||
* Gets the string representation of this element.
|
* Gets the string representation of this element.
|
||||||
@@ -49,13 +51,13 @@ module Generated {
|
|||||||
* Classes can override this to indicate this node should be in the "hidden" AST, mostly reserved
|
* Classes can override this to indicate this node should be in the "hidden" AST, mostly reserved
|
||||||
* for conversions and syntactic sugar nodes like parentheses.
|
* for conversions and syntactic sugar nodes like parentheses.
|
||||||
*/
|
*/
|
||||||
{{name}} getResolveStep() { none() } // overridden by subclasses
|
{{name}}Alias getResolveStep() { none() } // overridden by subclasses
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the element that should substitute this element in the explicit AST, applying `getResolveStep`
|
* Gets the element that should substitute this element in the explicit AST, applying `getResolveStep`
|
||||||
* transitively.
|
* transitively.
|
||||||
*/
|
*/
|
||||||
final {{name}} resolve() {
|
final {{name}}Alias resolve() {
|
||||||
not exists(this.getResolveStep()) and result = this
|
not exists(this.getResolveStep()) and result = this
|
||||||
or
|
or
|
||||||
result = this.getResolveStep().resolve()
|
result = this.getResolveStep().resolve()
|
||||||
|
|||||||
12
misc/codegen/templates/ql_class_public.mustache
Normal file
12
misc/codegen/templates/ql_class_public.mustache
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// generated by {{generator}}, do not edit
|
||||||
|
/**
|
||||||
|
* This module provides the public class `{{name}}`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
private import {{name}}Impl
|
||||||
|
{{#imports}}
|
||||||
|
import {{.}}
|
||||||
|
{{/imports}}
|
||||||
|
|
||||||
|
{{>ql_stub_class_qldoc}}
|
||||||
|
final class {{name}} = Impl::{{name}};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
/**
|
/**
|
||||||
* This module exports all modules providing `Element` subclasses.
|
* This module exports all modules providing `Element` subclasses.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
/**
|
/**
|
||||||
* This module provides the generated parent/child relationship.
|
* This module provides the generated parent/child relationship.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -6,10 +6,16 @@ private import {{import_prefix}}.Raw
|
|||||||
private import {{import_prefix}}.Synth
|
private import {{import_prefix}}.Synth
|
||||||
{{/has_synth_accessors}}
|
{{/has_synth_accessors}}
|
||||||
|
|
||||||
{{>ql_stub_class_qldoc}}
|
/**
|
||||||
class {{name}} extends Generated::{{name}} {
|
* INTERNAL: This module contains the customizable definition of `{{name}}` and should not
|
||||||
|
* be referenced directly.
|
||||||
|
*/
|
||||||
|
module Impl {
|
||||||
|
{{>ql_stub_class_qldoc}}
|
||||||
|
class {{name}} extends Generated::{{name}} {
|
||||||
{{#synth_accessors}}
|
{{#synth_accessors}}
|
||||||
private
|
private
|
||||||
cached {{type}} getUnderlying{{argument}}() { this = Synth::T{{name}}({{#constructorparams}}{{^first}},{{/first}}{{param}}{{/constructorparams}})}
|
cached {{type}} getUnderlying{{argument}}() { this = Synth::T{{name}}({{#constructorparams}}{{^first}},{{/first}}{{param}}{{/constructorparams}})}
|
||||||
{{/synth_accessors}}
|
{{/synth_accessors}}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* This module provides a hand-modifiable wrapper around the generated class `{{name}}`.
|
* This module provides a hand-modifiable wrapper around the generated class `{{name}}`.
|
||||||
{{#internal}}
|
*
|
||||||
* INTERNAL: Do not use.
|
* INTERNAL: Do not use.
|
||||||
{{/internal}}
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
|
|
||||||
import {{elements_module}}
|
import {{elements_module}}
|
||||||
import TestUtils
|
import TestUtils
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
|
|
||||||
After a source file is added in this directory and {{generator}} is run again, test queries
|
After a source file is added in this directory and {{generator}} is run again, test queries
|
||||||
will appear and this file will be deleted
|
will appear and this file will be deleted
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
|
|
||||||
import {{elements_module}}
|
import {{elements_module}}
|
||||||
import TestUtils
|
import TestUtils
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
|
|
||||||
#![cfg_attr(any(), rustfmt::skip)]
|
#![cfg_attr(any(), rustfmt::skip)]
|
||||||
|
|
||||||
use crate::trap::{TrapId, TrapEntry};
|
use crate::trap;
|
||||||
use codeql_extractor::trap;
|
|
||||||
{{#classes}}
|
{{#classes}}
|
||||||
|
|
||||||
|
{{#is_entry}}
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct {{name}} {
|
pub struct {{name}} {
|
||||||
pub id: TrapId,
|
pub id: trap::TrapId<{{name}}>,
|
||||||
{{#fields}}
|
{{#fields}}
|
||||||
pub {{field_name}}: {{type}},
|
pub {{field_name}}: {{type}},
|
||||||
{{/fields}}
|
{{/fields}}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TrapEntry for {{name}} {
|
impl trap::TrapEntry for {{name}} {
|
||||||
fn extract_id(&mut self) -> TrapId {
|
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||||
std::mem::replace(&mut self.id, TrapId::Star)
|
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn emit(self, id: trap::Label, out: &mut trap::Writer) {
|
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||||
{{#single_field_entries}}
|
{{#single_field_entries}}
|
||||||
out.add_tuple("{{table_name}}", vec![trap::Arg::Label(id){{#fields}}, self.{{field_name}}.into(){{/fields}}]);
|
out.add_tuple("{{entry_table}}", vec![id.into(){{#fields}}, self.{{field_name}}.into(){{/fields}}]);
|
||||||
{{/single_field_entries}}
|
{{/single_field_entries}}
|
||||||
{{#fields}}
|
{{#fields}}
|
||||||
{{#is_predicate}}
|
{{#is_predicate}}
|
||||||
if self.{{field_name}} {
|
if self.{{field_name}} {
|
||||||
out.add_tuple("{{table_name}}", vec![trap::Arg::Label(id)]);
|
out.add_tuple("{{table_name}}", vec![id.into()]);
|
||||||
}
|
}
|
||||||
{{/is_predicate}}
|
{{/is_predicate}}
|
||||||
{{#is_optional}}
|
{{#is_optional}}
|
||||||
{{^is_repeated}}
|
{{^is_repeated}}
|
||||||
if let Some(v) = self.{{field_name}} {
|
if let Some(v) = self.{{field_name}} {
|
||||||
out.add_tuple("{{table_name}}", vec![trap::Arg::Label(id), v.into()]);
|
out.add_tuple("{{table_name}}", vec![id.into(), v.into()]);
|
||||||
}
|
}
|
||||||
{{/is_repeated}}
|
{{/is_repeated}}
|
||||||
{{/is_optional}}
|
{{/is_optional}}
|
||||||
{{#is_repeated}}
|
{{#is_repeated}}
|
||||||
for (i, v) in self.{{field_name}}.into_iter().enumerate() {
|
for (i, v) in self.{{field_name}}.into_iter().enumerate() {
|
||||||
{{^is_optional}}
|
{{^is_optional}}
|
||||||
out.add_tuple("{{table_name}}", vec![trap::Arg::Label(id){{^is_unordered}}, i.into(){{/is_unordered}}, v.into()]);
|
out.add_tuple("{{table_name}}", vec![id.into(){{^is_unordered}}, i.into(){{/is_unordered}}, v.into()]);
|
||||||
{{/is_optional}}
|
{{/is_optional}}
|
||||||
{{#is_optional}}
|
{{#is_optional}}
|
||||||
if let Some(v) = v {
|
if let Some(v) = v {
|
||||||
out.add_tuple("{{table_name}}", vec![trap::Arg::Label(id){{^is_unordered}}, i.into(){{/is_unordered}}, v.into()]);
|
out.add_tuple("{{table_name}}", vec![id.into(){{^is_unordered}}, i.into(){{/is_unordered}}, v.into()]);
|
||||||
}
|
}
|
||||||
{{/is_optional}}
|
{{/is_optional}}
|
||||||
}
|
}
|
||||||
@@ -51,4 +51,27 @@ impl TrapEntry for {{name}} {
|
|||||||
{{/fields}}
|
{{/fields}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{{/is_entry}}
|
||||||
|
{{^is_entry}}
|
||||||
|
{{! virtual class, make it unbuildable }}
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct {{name}} {
|
||||||
|
_unused: ()
|
||||||
|
}
|
||||||
|
{{/is_entry}}
|
||||||
|
|
||||||
|
impl trap::TrapClass for {{name}} {
|
||||||
|
fn class_name() -> &'static str { "{{name}}" }
|
||||||
|
}
|
||||||
|
{{#ancestors}}
|
||||||
|
|
||||||
|
impl From<trap::Label<{{name}}>> for trap::Label<{{.}}> {
|
||||||
|
fn from(value: trap::Label<{{name}}>) -> Self {
|
||||||
|
// SAFETY: this is safe because in the dbscheme {{name}} is a subclass of {{.}}
|
||||||
|
unsafe {
|
||||||
|
Self::from_untyped(value.as_untyped())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{{/ancestors}}
|
||||||
{{/classes}}
|
{{/classes}}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
{{#modules}}
|
{{#modules}}
|
||||||
|
|
||||||
mod {{.}};
|
mod {{.}};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// generated by {{generator}}
|
// generated by {{generator}}, do not edit
|
||||||
|
|
||||||
{{#function}}
|
{{#function}}
|
||||||
fn {{name}}{{signature}} {
|
fn {{name}}{{signature}} {
|
||||||
|
|||||||
@@ -147,15 +147,14 @@ def test_class_with_children():
|
|||||||
assert cls.has_children is True
|
assert cls.has_children is True
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("doc,internal,expected",
|
@pytest.mark.parametrize("doc,expected",
|
||||||
[
|
[
|
||||||
(["foo", "bar"], False, True),
|
(["foo", "bar"], True),
|
||||||
(["foo", "bar"], True, True),
|
(["foo", "bar"], True),
|
||||||
([], False, False),
|
([], False)
|
||||||
([], True, True),
|
|
||||||
])
|
])
|
||||||
def test_has_doc(doc, internal, expected):
|
def test_has_doc(doc, expected):
|
||||||
stub = ql.Stub("Class", base_import="foo", import_prefix="bar", doc=doc, internal=internal)
|
stub = ql.Stub("Class", base_import="foo", import_prefix="bar", doc=doc)
|
||||||
assert stub.has_qldoc is expected
|
assert stub.has_qldoc is expected
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user