Skip to content

Commit e6dd8be

Browse files
committed
Rust: Skip model generation for functions with a ; in their canonical path
1 parent 8756b81 commit e6dd8be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ private import codeql.rust.dataflow.internal.FlowSummaryImpl as FlowSummary
1313
private newtype TCallable =
1414
TFunction(R::Function api, string path) {
1515
path = api.getCanonicalPath() and
16+
// A canonical path can contain `;` as the syntax for array types use `;`.
17+
// This does not work with the shared model generator, so for now we just
18+
// exclude canonical paths with `;`s.
19+
not exists(api.getCanonicalPath().indexOf(";")) and
1620
(
1721
// This excludes closures (these are not exported API endpoints) and
1822
// functions without a `pub` visibility. A function can be `pub` without

0 commit comments

Comments
 (0)