Merge pull request #2371 from github/koesie10/switch-to-argument-this
Rename `Argument[-1]` to `Argument[this]`
This commit is contained in:
@@ -213,13 +213,13 @@ DataExtensionsEditor.args = {
|
|||||||
},
|
},
|
||||||
"org.sql2o.Connection#createQuery(String)": {
|
"org.sql2o.Connection#createQuery(String)": {
|
||||||
type: "summary",
|
type: "summary",
|
||||||
input: "Argument[-1]",
|
input: "Argument[this]",
|
||||||
output: "ReturnValue",
|
output: "ReturnValue",
|
||||||
kind: "taint",
|
kind: "taint",
|
||||||
},
|
},
|
||||||
"org.sql2o.Sql2o#open()": {
|
"org.sql2o.Sql2o#open()": {
|
||||||
type: "summary",
|
type: "summary",
|
||||||
input: "Argument[-1]",
|
input: "Argument[this]",
|
||||||
output: "ReturnValue",
|
output: "ReturnValue",
|
||||||
kind: "taint",
|
kind: "taint",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ MethodRow.args = {
|
|||||||
},
|
},
|
||||||
modeledMethod: {
|
modeledMethod: {
|
||||||
type: "summary",
|
type: "summary",
|
||||||
input: "Argument[-1]",
|
input: "Argument[this]",
|
||||||
output: "ReturnValue",
|
output: "ReturnValue",
|
||||||
kind: "taint",
|
kind: "taint",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ export const MethodRow = ({
|
|||||||
const target = e.target as HTMLSelectElement;
|
const target = e.target as HTMLSelectElement;
|
||||||
|
|
||||||
onChange(externalApiUsage, {
|
onChange(externalApiUsage, {
|
||||||
// If there are no arguments, we will default to "this", which is Argument[-1]
|
// If there are no arguments, we will default to "Argument[this]"
|
||||||
input: argumentsList.length === 0 ? "Argument[-1]" : "Argument[0]",
|
input: argumentsList.length === 0 ? "Argument[this]" : "Argument[0]",
|
||||||
output: "ReturnType",
|
output: "ReturnType",
|
||||||
kind: "value",
|
kind: "value",
|
||||||
...modeledMethod,
|
...modeledMethod,
|
||||||
@@ -167,9 +167,7 @@ export const MethodRow = ({
|
|||||||
{modeledMethod?.type &&
|
{modeledMethod?.type &&
|
||||||
["sink", "summary"].includes(modeledMethod?.type) && (
|
["sink", "summary"].includes(modeledMethod?.type) && (
|
||||||
<Dropdown value={modeledMethod?.input} onInput={handleInputInput}>
|
<Dropdown value={modeledMethod?.input} onInput={handleInputInput}>
|
||||||
<VSCodeOption value="Argument[-1]">
|
<VSCodeOption value="Argument[this]">Argument[this]</VSCodeOption>
|
||||||
Argument[-1]: this
|
|
||||||
</VSCodeOption>
|
|
||||||
{argumentsList.map((argument, index) => (
|
{argumentsList.map((argument, index) => (
|
||||||
<VSCodeOption key={argument} value={`Argument[${index}]`}>
|
<VSCodeOption key={argument} value={`Argument[${index}]`}>
|
||||||
Argument[{index}]: {argument}
|
Argument[{index}]: {argument}
|
||||||
@@ -183,9 +181,7 @@ export const MethodRow = ({
|
|||||||
["source", "summary"].includes(modeledMethod?.type) && (
|
["source", "summary"].includes(modeledMethod?.type) && (
|
||||||
<Dropdown value={modeledMethod?.output} onInput={handleOutputInput}>
|
<Dropdown value={modeledMethod?.output} onInput={handleOutputInput}>
|
||||||
<VSCodeOption value="ReturnValue">ReturnValue</VSCodeOption>
|
<VSCodeOption value="ReturnValue">ReturnValue</VSCodeOption>
|
||||||
<VSCodeOption value="Argument[-1]">
|
<VSCodeOption value="Argument[this]">Argument[this]</VSCodeOption>
|
||||||
Argument[-1]: this
|
|
||||||
</VSCodeOption>
|
|
||||||
{argumentsList.map((argument, index) => (
|
{argumentsList.map((argument, index) => (
|
||||||
<VSCodeOption key={argument} value={`Argument[${index}]`}>
|
<VSCodeOption key={argument} value={`Argument[${index}]`}>
|
||||||
Argument[{index}]: {argument}
|
Argument[{index}]: {argument}
|
||||||
|
|||||||
Reference in New Issue
Block a user