Skip to content

Commit 3c98f94

Browse files
Merge pull request #3091 from MathiasVP/autocomplete-to-new-dataflow-and-taint-tracking
Change dataflow and taint-tracking snippets to match the module-based API
2 parents 98b30af + 558f7f6 commit 3c98f94

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- 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)
66
- Remove support for CodeQL CLI versions older than 2.11.6. [#3087](https://github.com/github/vscode-codeql/pull/3087)
77
- Preserve focus on results viewer when showing a location in a file. [#3088](https://github.com/github/vscode-codeql/pull/3088)
8+
- The `dataflowtracking` and `tainttracking` snippets expand to the new module-based interface. [#3091](https://github.com/github/vscode-codeql/pull/3091)
89

910
## 1.10.0 - 16 November 2023
1011

extensions/ql-vscode/snippets.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,34 @@
3030
"Dataflow Tracking Class": {
3131
"prefix": "dataflowtracking",
3232
"body": [
33-
"class $1 extends DataFlow::Configuration {",
34-
"\t$1() { this = \"$1\" }",
35-
"\t",
36-
"\toverride predicate isSource(DataFlow::Node node) {",
33+
"module $1 implements DataFlow::ConfigSig {",
34+
"\tpredicate isSource(DataFlow::Node node) {",
3735
"\t\t${2:none()}",
3836
"\t}",
39-
"\t",
40-
"\toverride predicate isSink(DataFlow::Node node) {",
37+
"",
38+
"\tpredicate isSink(DataFlow::Node node) {",
4139
"\t\t${3:none()}",
4240
"\t}",
43-
"}"
41+
"}",
42+
"",
43+
"module ${4:Flow} = DataFlow::Global<$1>;"
4444
],
4545
"description": "Boilerplate for a dataflow tracking class"
4646
},
4747
"Taint Tracking Class": {
4848
"prefix": "tainttracking",
4949
"body": [
50-
"class $1 extends TaintTracking::Configuration {",
51-
"\t$1() { this = \"$1\" }",
52-
"\t",
53-
"\toverride predicate isSource(DataFlow::Node node) {",
50+
"module $1 implements DataFlow::ConfigSig {",
51+
"\tpredicate isSource(DataFlow::Node node) {",
5452
"\t\t${2:none()}",
5553
"\t}",
56-
"\t",
57-
"\toverride predicate isSink(DataFlow::Node node) {",
54+
"",
55+
"\tpredicate isSink(DataFlow::Node node) {",
5856
"\t\t${3:none()}",
5957
"\t}",
60-
"}"
58+
"}",
59+
"",
60+
"module ${4:Flow} = TaintTracking::Global<$1>;"
6161
],
6262
"description": "Boilerplate for a taint tracking class"
6363
},

0 commit comments

Comments
 (0)