diff --git a/extensions/ql-vscode/CHANGELOG.md b/extensions/ql-vscode/CHANGELOG.md index 437c23ced..80e580274 100644 --- a/extensions/ql-vscode/CHANGELOG.md +++ b/extensions/ql-vscode/CHANGELOG.md @@ -5,6 +5,7 @@ - Add a prompt to the "Quick query" command to encourage users in single-folder workspaces to use "Create query" instead. [#3082](https://github.com/github/vscode-codeql/pull/3082) - Remove support for CodeQL CLI versions older than 2.11.6. [#3087](https://github.com/github/vscode-codeql/pull/3087) - Preserve focus on results viewer when showing a location in a file. [#3088](https://github.com/github/vscode-codeql/pull/3088) +- The `dataflowtracking` and `tainttracking` snippets expand to the new module-based interface. [#3091](https://github.com/github/vscode-codeql/pull/3091) ## 1.10.0 - 16 November 2023 diff --git a/extensions/ql-vscode/snippets.json b/extensions/ql-vscode/snippets.json index 5ad3f5a67..198e4eec9 100644 --- a/extensions/ql-vscode/snippets.json +++ b/extensions/ql-vscode/snippets.json @@ -30,34 +30,34 @@ "Dataflow Tracking Class": { "prefix": "dataflowtracking", "body": [ - "class $1 extends DataFlow::Configuration {", - "\t$1() { this = \"$1\" }", - "\t", - "\toverride predicate isSource(DataFlow::Node node) {", + "module $1 implements DataFlow::ConfigSig {", + "\tpredicate isSource(DataFlow::Node node) {", "\t\t${2:none()}", "\t}", - "\t", - "\toverride predicate isSink(DataFlow::Node node) {", + "", + "\tpredicate isSink(DataFlow::Node node) {", "\t\t${3:none()}", "\t}", - "}" + "}", + "", + "module ${4:Flow} = DataFlow::Global<$1>;" ], "description": "Boilerplate for a dataflow tracking class" }, "Taint Tracking Class": { "prefix": "tainttracking", "body": [ - "class $1 extends TaintTracking::Configuration {", - "\t$1() { this = \"$1\" }", - "\t", - "\toverride predicate isSource(DataFlow::Node node) {", + "module $1 implements DataFlow::ConfigSig {", + "\tpredicate isSource(DataFlow::Node node) {", "\t\t${2:none()}", "\t}", - "\t", - "\toverride predicate isSink(DataFlow::Node node) {", + "", + "\tpredicate isSink(DataFlow::Node node) {", "\t\t${3:none()}", "\t}", - "}" + "}", + "", + "module ${4:Flow} = TaintTracking::Global<$1>;" ], "description": "Boilerplate for a taint tracking class" },