Merge pull request #2563 from github/koesie10/classification

Add call classification and supported kind to data extensions editor
This commit is contained in:
Koen Vlaswinkel
2023-07-14 12:01:58 +02:00
committed by GitHub
11 changed files with 272 additions and 35 deletions

View File

@@ -1,5 +1,10 @@
import { DecodedBqrsChunk } from "../common/bqrs-cli-types";
import { Call, ExternalApiUsage } from "./external-api-usage";
import {
Call,
CallClassification,
ExternalApiUsage,
} from "./external-api-usage";
import { ModeledMethodType } from "./modeled-method";
export function decodeBqrsToExternalApiUsages(
chunk: DecodedBqrsChunk,
@@ -11,6 +16,8 @@ export function decodeBqrsToExternalApiUsages(
const signature = tuple[1] as string;
const supported = (tuple[2] as string) === "true";
const library = tuple[4] as string;
const type = tuple[6] as ModeledMethodType;
const classification = tuple[8] as CallClassification;
const [packageWithType, methodDeclaration] = signature.split("#");
@@ -39,12 +46,16 @@ export function decodeBqrsToExternalApiUsages(
methodName,
methodParameters,
supported,
supportedType: type,
usages: [],
});
}
const method = methodsByApiName.get(signature)!;
method.usages.push(usage);
method.usages.push({
...usage,
classification,
});
});
return Array.from(methodsByApiName.values());

View File

@@ -1,10 +1,22 @@
import { ResolvableLocationValue } from "../common/bqrs-cli-types";
import { ModeledMethodType } from "./modeled-method";
export type Call = {
label: string;
url: ResolvableLocationValue;
};
export enum CallClassification {
Unknown = "unknown",
Source = "source",
Test = "test",
Generated = "generated",
}
export type Usage = Call & {
classification: CallClassification;
};
export type ExternalApiUsage = {
/**
* Contains the name of the library containing the method declaration, e.g. `sql2o-1.6.0.jar` or `System.Runtime.dll`
@@ -30,5 +42,6 @@ export type ExternalApiUsage = {
* If so, there is no need for the user to model it themselves.
*/
supported: boolean;
usages: Call[];
supportedType: ModeledMethodType;
usages: Usage[];
};

View File

@@ -22,12 +22,16 @@ class ExternalApi extends CallableMethod {
private Call aUsage(ExternalApi api) { result.getTarget().getUnboundDeclaration() = api }
from ExternalApi api, string apiName, boolean supported, Call usage
from
ExternalApi api, string apiName, boolean supported, Call usage, string type, string classification
where
apiName = api.getApiName() and
supported = isSupported(api) and
usage = aUsage(api)
select usage, apiName, supported.toString(), "supported", api.getFile().getBaseName(), "library"
usage = aUsage(api) and
type = supportedType(api) and
classification = methodClassification(usage)
select usage, apiName, supported.toString(), "supported", api.getFile().getBaseName(), "library",
type, "type", classification, "classification"
`,
frameworkModeQuery: `/**
* @name Public methods
@@ -46,12 +50,13 @@ class PublicMethod extends CallableMethod {
PublicMethod() { this.fromSource() and not this.getFile() instanceof TestFile }
}
from PublicMethod publicMethod, string apiName, boolean supported
from PublicMethod publicMethod, string apiName, boolean supported, string type
where
apiName = publicMethod.getApiName() and
supported = isSupported(publicMethod)
supported = isSupported(publicMethod) and
type = supportedType(publicMethod)
select publicMethod, apiName, supported.toString(), "supported",
publicMethod.getFile().getBaseName(), "library"
publicMethod.getFile().getBaseName(), "library", type, "type", "unknown", "classification"
`,
dependencies: {
"AutomodelVsCode.qll": `/** Provides classes and predicates related to handling APIs for the VS Code extension. */
@@ -66,6 +71,7 @@ private import semmle.code.csharp.dataflow.internal.DataFlowPrivate
private import semmle.code.csharp.dataflow.internal.DataFlowDispatch as DataFlowDispatch
private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
private import semmle.code.csharp.dataflow.internal.TaintTrackingPrivate
private import semmle.code.csharp.frameworks.Test
private import semmle.code.csharp.security.dataflow.flowsources.Remote
pragma[nomagic]
@@ -180,6 +186,25 @@ boolean isSupported(CallableMethod callableMethod) {
result = false
}
string supportedType(CallableMethod method) {
method.isSink() and result = "sink"
or
method.isSource() and result = "source"
or
method.hasSummary() and result = "summary"
or
method.isNeutral() and result = "neutral"
or
not method.isSupported() and result = "none"
}
string methodClassification(Call method) {
method.getFile() instanceof TestFile and result = "test"
or
not method.getFile() instanceof TestFile and
result = "source"
}
/**
* Gets the nested name of the declaration.
*

View File

@@ -16,17 +16,19 @@ class ExternalApi extends CallableMethod {
ExternalApi() { not this.fromSource() }
}
private Call aUsage(ExternalApi api) {
result.getCallee().getSourceDeclaration() = api and
not result.getFile() instanceof GeneratedFile
}
private Call aUsage(ExternalApi api) { result.getCallee().getSourceDeclaration() = api }
from ExternalApi externalApi, string apiName, boolean supported, Call usage
from
ExternalApi externalApi, string apiName, boolean supported, Call usage, string type,
string classification
where
apiName = externalApi.getApiName() and
supported = isSupported(externalApi) and
usage = aUsage(externalApi)
select usage, apiName, supported.toString(), "supported", externalApi.jarContainer(), "library"
usage = aUsage(externalApi) and
type = supportedType(externalApi) and
classification = methodClassification(usage)
select usage, apiName, supported.toString(), "supported", externalApi.jarContainer(), "library",
type, "type", classification, "classification"
`,
frameworkModeQuery: `/**
* @name Public methods
@@ -41,12 +43,14 @@ import AutomodelVsCode
class PublicMethodFromSource extends CallableMethod, ModelApi { }
from PublicMethodFromSource publicMethod, string apiName, boolean supported
from PublicMethodFromSource publicMethod, string apiName, boolean supported, string type
where
apiName = publicMethod.getApiName() and
supported = isSupported(publicMethod)
supported = isSupported(publicMethod) and
type = supportedType(publicMethod)
select publicMethod, apiName, supported.toString(), "supported",
publicMethod.getCompilationUnit().getParentContainer().getBaseName(), "library"
publicMethod.getCompilationUnit().getParentContainer().getBaseName(), "library", type, "type",
"unknown", "classification"
`,
dependencies: {
"AutomodelVsCode.qll": `/** Provides classes and predicates related to handling APIs for the VS Code extension. */
@@ -147,6 +151,28 @@ boolean isSupported(CallableMethod method) {
not method.isSupported() and result = false
}
string supportedType(CallableMethod method) {
method.isSink() and result = "sink"
or
method.isSource() and result = "source"
or
method.hasSummary() and result = "summary"
or
method.isNeutral() and result = "neutral"
or
not method.isSupported() and result = "none"
}
string methodClassification(Call method) {
isInTestFile(method.getLocation().getFile()) and result = "test"
or
method.getFile() instanceof GeneratedFile and result = "generated"
or
not isInTestFile(method.getLocation().getFile()) and
not method.getFile() instanceof GeneratedFile and
result = "source"
}
// The below is a copy of https://github.com/github/codeql/blob/249f9f863db1e94e3c46ca85b49fb0ec32f8ca92/java/ql/lib/semmle/code/java/dataflow/internal/ModelExclusions.qll
// to avoid the use of internal modules.
/** Holds if the given package \`p\` is a test package. */

View File

@@ -9,6 +9,10 @@ export type Query = {
* - "supported": a string literal. This is required to make the query a valid problem query.
* - libraryName: the name of the library that contains the external API. This is a string and usually the basename of a file.
* - "library": a string literal. This is required to make the query a valid problem query.
* - type: the modeled kind of the method, either "sink", "source", "summary", or "neutral"
* - "type": a string literal. This is required to make the query a valid problem query.
* - classification: the classification of the use of the method, either "source", "test", "generated", or "unknown"
* - "classification: a string literal. This is required to make the query a valid problem query.
*/
applicationModeQuery: string;
/**
@@ -22,6 +26,10 @@ export type Query = {
* - "supported": a string literal. This is required to make the query a valid problem query.
* - libraryName: an arbitrary string. This is required to make it match the structure of the application query.
* - "library": a string literal. This is required to make the query a valid problem query.
* - type: the modeled kind of the method, either "sink", "source", "summary", or "neutral"
* - "type": a string literal. This is required to make the query a valid problem query.
* - "unknown": a string literal. This is required to make it match the structure of the application query.
* - "classification: a string literal. This is required to make the query a valid problem query.
*/
frameworkModeQuery: string;
dependencies?: {

View File

@@ -4,6 +4,7 @@ import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Mode } from "../../data-extensions-editor/shared/mode";
import { DataExtensionsEditor as DataExtensionsEditorComponent } from "../../view/data-extensions-editor/DataExtensionsEditor";
import { CallClassification } from "../../data-extensions-editor/external-api-usage";
export default {
title: "Data Extensions Editor/Data Extensions Editor",
@@ -39,6 +40,7 @@ DataExtensionsEditor.args = {
methodName: "createQuery",
methodParameters: "(String)",
supported: true,
supportedType: "summary",
usages: Array(10).fill({
label: "createQuery(...)",
url: {
@@ -48,6 +50,7 @@ DataExtensionsEditor.args = {
endLine: 15,
endColumn: 56,
},
classification: CallClassification.Source,
}),
},
{
@@ -58,6 +61,7 @@ DataExtensionsEditor.args = {
methodName: "executeScalar",
methodParameters: "(Class)",
supported: true,
supportedType: "neutral",
usages: Array(2).fill({
label: "executeScalar(...)",
url: {
@@ -67,6 +71,7 @@ DataExtensionsEditor.args = {
endLine: 15,
endColumn: 85,
},
classification: CallClassification.Source,
}),
},
{
@@ -77,6 +82,7 @@ DataExtensionsEditor.args = {
methodName: "open",
methodParameters: "()",
supported: false,
supportedType: "none",
usages: Array(28).fill({
label: "open(...)",
url: {
@@ -86,6 +92,7 @@ DataExtensionsEditor.args = {
endLine: 14,
endColumn: 35,
},
classification: CallClassification.Source,
}),
},
{
@@ -96,6 +103,7 @@ DataExtensionsEditor.args = {
methodName: "println",
methodParameters: "(String)",
supported: true,
supportedType: "summary",
usages: [
{
label: "println(...)",
@@ -106,6 +114,18 @@ DataExtensionsEditor.args = {
endLine: 29,
endColumn: 49,
},
classification: CallClassification.Source,
},
{
label: "println(...)",
url: {
uri: "file:/home/runner/work/sql2o-example/sql2o-example/src/test/java/org/example/HelloControllerTest.java",
startLine: 29,
startColumn: 9,
endLine: 29,
endColumn: 49,
},
classification: CallClassification.Test,
},
],
},
@@ -118,6 +138,7 @@ DataExtensionsEditor.args = {
methodName: "run",
methodParameters: "(Class,String[])",
supported: false,
supportedType: "none",
usages: Array(7).fill({
label: "run(...)",
url: {
@@ -127,6 +148,7 @@ DataExtensionsEditor.args = {
endLine: 9,
endColumn: 66,
},
classification: CallClassification.Source,
}),
},
{
@@ -137,6 +159,7 @@ DataExtensionsEditor.args = {
methodName: "Sql2o",
methodParameters: "(String,String,String)",
supported: false,
supportedType: "none",
usages: Array(106).fill({
label: "new Sql2o(...)",
url: {
@@ -145,6 +168,7 @@ DataExtensionsEditor.args = {
startColumn: 33,
endLine: 10,
endColumn: 88,
classification: CallClassification.Test,
},
}),
},
@@ -156,16 +180,31 @@ DataExtensionsEditor.args = {
methodName: "Sql2o",
methodParameters: "(String)",
supported: false,
usages: Array(4).fill({
label: "new Sql2o(...)",
url: {
uri: "file:/home/runner/work/sql2o-example/sql2o-example/src/main/java/org/example/HelloController.java",
startLine: 23,
startColumn: 23,
endLine: 23,
endColumn: 36,
supportedType: "none",
usages: [
...Array(4).fill({
label: "new Sql2o(...)",
url: {
uri: "file:/home/runner/work/sql2o-example/sql2o-example/src/main/java/org/example/HelloController.java",
startLine: 23,
startColumn: 23,
endLine: 23,
endColumn: 36,
},
classification: CallClassification.Test,
}),
{
label: "new Sql2o(...)",
url: {
uri: "file:/home/runner/work/sql2o-example/sql2o-example/build/generated/java/org/example/HelloControllerGenerated.java",
startLine: 23,
startColumn: 23,
endLine: 23,
endColumn: 36,
},
classification: CallClassification.Generated,
},
}),
],
},
],
initialModeledMethods: {

View File

@@ -3,6 +3,7 @@ import * as React from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { MethodRow as MethodRowComponent } from "../../view/data-extensions-editor/MethodRow";
import { CallClassification } from "../../data-extensions-editor/external-api-usage";
export default {
title: "Data Extensions Editor/Method Row",
@@ -23,6 +24,7 @@ MethodRow.args = {
methodName: "open",
methodParameters: "()",
supported: true,
supportedType: "summary",
usages: [
{
label: "open(...)",
@@ -33,6 +35,7 @@ MethodRow.args = {
endLine: 14,
endColumn: 35,
},
classification: CallClassification.Source,
},
{
label: "open(...)",
@@ -43,6 +46,7 @@ MethodRow.args = {
endLine: 25,
endColumn: 35,
},
classification: CallClassification.Source,
},
],
},

View File

@@ -0,0 +1,62 @@
import * as React from "react";
import { useMemo } from "react";
import {
CallClassification,
ExternalApiUsage,
} from "../../data-extensions-editor/external-api-usage";
import { VSCodeTag } from "@vscode/webview-ui-toolkit/react";
import styled from "styled-components";
const ClassificationsContainer = styled.div`
display: inline-flex;
flex-direction: row;
gap: 0.5rem;
`;
const ClassificationTag = styled(VSCodeTag)`
font-size: 0.75em;
`;
type Props = {
externalApiUsage: ExternalApiUsage;
};
export const MethodClassifications = ({ externalApiUsage }: Props) => {
const allUsageClassifications = useMemo(
() =>
new Set(
externalApiUsage.usages.map((usage) => {
return usage.classification;
}),
),
[externalApiUsage.usages],
);
const inSource = allUsageClassifications.has(CallClassification.Source);
const inTest = allUsageClassifications.has(CallClassification.Test);
const inGenerated = allUsageClassifications.has(CallClassification.Generated);
const tooltip = useMemo(() => {
if (inTest && inGenerated) {
return "This method is only used from test and generated code";
}
if (inTest) {
return "This method is only used from test code";
}
if (inGenerated) {
return "This method is only used from generated code";
}
return "";
}, [inTest, inGenerated]);
if (inSource) {
return null;
}
return (
<ClassificationsContainer title={tooltip}>
{inTest && <ClassificationTag>Test</ClassificationTag>}
{inGenerated && <ClassificationTag>Generated</ClassificationTag>}
</ClassificationsContainer>
);
};

View File

@@ -19,6 +19,7 @@ import { KindInput } from "./KindInput";
import { extensiblePredicateDefinitions } from "../../data-extensions-editor/predicates";
import { Mode } from "../../data-extensions-editor/shared/mode";
import { Dropdown } from "../common/Dropdown";
import { MethodClassifications } from "./MethodClassifications";
const ApiOrMethodCell = styled(VSCodeDataGridCell)`
display: flex;
@@ -39,7 +40,7 @@ const ViewLink = styled(VSCodeLink)`
white-space: nowrap;
`;
const modelTypeOptions = [
const modelTypeOptions: Array<{ value: ModeledMethodType; label: string }> = [
{ value: "none", label: "Unmodeled" },
{ value: "source", label: "Source" },
{ value: "sink", label: "Sink" },
@@ -197,6 +198,7 @@ function ModelableMethodRow(props: Props) {
</UsagesButton>
)}
<ViewLink onClick={jumpToUsage}>View</ViewLink>
<MethodClassifications externalApiUsage={externalApiUsage} />
</ApiOrMethodCell>
<VSCodeDataGridCell gridColumn={2}>
<Dropdown
@@ -233,10 +235,7 @@ function ModelableMethodRow(props: Props) {
);
}
function UnmodelableMethodRow(props: {
externalApiUsage: ExternalApiUsage;
mode: Mode;
}) {
function UnmodelableMethodRow(props: Props) {
const { externalApiUsage, mode } = props;
const jumpToUsage = useCallback(
@@ -255,9 +254,10 @@ function UnmodelableMethodRow(props: {
</UsagesButton>
)}
<ViewLink onClick={jumpToUsage}>View</ViewLink>
<MethodClassifications externalApiUsage={externalApiUsage} />
</ApiOrMethodCell>
<VSCodeDataGridCell gridColumn="span 4">
Method already modeled by CodeQL or a different extension pack
Method modeled by CodeQL or a different extension pack
</VSCodeDataGridCell>
</VSCodeDataGridRow>
);

View File

@@ -3,7 +3,10 @@ import {
createAutoModelRequest,
parsePredictedClassifications,
} from "../../../src/data-extensions-editor/auto-model";
import { ExternalApiUsage } from "../../../src/data-extensions-editor/external-api-usage";
import {
CallClassification,
ExternalApiUsage,
} from "../../../src/data-extensions-editor/external-api-usage";
import { ModeledMethod } from "../../../src/data-extensions-editor/modeled-method";
import {
ClassificationType,
@@ -22,6 +25,7 @@ describe("createAutoModelRequest", () => {
methodName: "run",
methodParameters: "(Class,String[])",
supported: false,
supportedType: "none",
usages: [
{
label: "run(...)",
@@ -32,6 +36,7 @@ describe("createAutoModelRequest", () => {
endLine: 9,
endColumn: 66,
},
classification: CallClassification.Source,
},
],
},
@@ -43,6 +48,7 @@ describe("createAutoModelRequest", () => {
methodName: "createQuery",
methodParameters: "(String)",
supported: false,
supportedType: "none",
usages: [
{
label: "createQuery(...)",
@@ -53,6 +59,7 @@ describe("createAutoModelRequest", () => {
endLine: 15,
endColumn: 56,
},
classification: CallClassification.Source,
},
{
label: "createQuery(...)",
@@ -63,6 +70,7 @@ describe("createAutoModelRequest", () => {
endLine: 26,
endColumn: 39,
},
classification: CallClassification.Source,
},
],
},
@@ -74,6 +82,7 @@ describe("createAutoModelRequest", () => {
methodName: "executeScalar",
methodParameters: "(Class)",
supported: false,
supportedType: "none",
usages: [
{
label: "executeScalar(...)",
@@ -84,6 +93,7 @@ describe("createAutoModelRequest", () => {
endLine: 15,
endColumn: 85,
},
classification: CallClassification.Source,
},
{
label: "executeScalar(...)",
@@ -94,6 +104,7 @@ describe("createAutoModelRequest", () => {
endLine: 26,
endColumn: 68,
},
classification: CallClassification.Source,
},
],
},
@@ -105,6 +116,7 @@ describe("createAutoModelRequest", () => {
methodName: "open",
methodParameters: "()",
supported: false,
supportedType: "none",
usages: [
{
label: "open(...)",
@@ -115,6 +127,7 @@ describe("createAutoModelRequest", () => {
endLine: 14,
endColumn: 35,
},
classification: CallClassification.Source,
},
{
label: "open(...)",
@@ -125,6 +138,7 @@ describe("createAutoModelRequest", () => {
endLine: 25,
endColumn: 35,
},
classification: CallClassification.Source,
},
],
},
@@ -136,6 +150,7 @@ describe("createAutoModelRequest", () => {
methodName: "println",
methodParameters: "(String)",
supported: false,
supportedType: "none",
usages: [
{
label: "println(...)",
@@ -146,6 +161,7 @@ describe("createAutoModelRequest", () => {
endLine: 29,
endColumn: 49,
},
classification: CallClassification.Source,
},
],
},
@@ -157,6 +173,7 @@ describe("createAutoModelRequest", () => {
methodName: "Sql2o",
methodParameters: "(String,String,String)",
supported: false,
supportedType: "none",
usages: [
{
label: "new Sql2o(...)",
@@ -167,6 +184,7 @@ describe("createAutoModelRequest", () => {
endLine: 10,
endColumn: 88,
},
classification: CallClassification.Source,
},
],
},
@@ -178,6 +196,7 @@ describe("createAutoModelRequest", () => {
methodName: "Sql2o",
methodParameters: "(String)",
supported: false,
supportedType: "none",
usages: [
{
label: "new Sql2o(...)",
@@ -188,6 +207,7 @@ describe("createAutoModelRequest", () => {
endLine: 23,
endColumn: 36,
},
classification: CallClassification.Source,
},
],
},
@@ -199,6 +219,7 @@ describe("createAutoModelRequest", () => {
methodName: "test",
methodParameters: "()",
supported: true,
supportedType: "neutral",
usages: [
{
label: "abc.test(...)",
@@ -209,6 +230,7 @@ describe("createAutoModelRequest", () => {
endLine: 23,
endColumn: 36,
},
classification: CallClassification.Source,
},
],
},

View File

@@ -5,6 +5,7 @@ import {
createFilenameForLibrary,
loadDataExtensionYaml,
} from "../../../src/data-extensions-editor/yaml";
import { CallClassification } from "../../../src/data-extensions-editor/external-api-usage";
describe("createDataExtensionYaml", () => {
it("creates the correct YAML file", () => {
@@ -18,6 +19,7 @@ describe("createDataExtensionYaml", () => {
methodName: "createQuery",
methodParameters: "(String)",
supported: true,
supportedType: "sink",
usages: [
{
label: "createQuery(...)",
@@ -28,6 +30,7 @@ describe("createDataExtensionYaml", () => {
endLine: 15,
endColumn: 56,
},
classification: CallClassification.Source,
},
{
label: "createQuery(...)",
@@ -38,6 +41,7 @@ describe("createDataExtensionYaml", () => {
endLine: 26,
endColumn: 39,
},
classification: CallClassification.Source,
},
],
},
@@ -58,6 +62,7 @@ describe("createDataExtensionYaml", () => {
methodName: "executeScalar",
methodParameters: "(Class)",
supported: true,
supportedType: "neutral",
usages: [
{
label: "executeScalar(...)",
@@ -68,6 +73,7 @@ describe("createDataExtensionYaml", () => {
endLine: 15,
endColumn: 85,
},
classification: CallClassification.Source,
},
{
label: "executeScalar(...)",
@@ -78,6 +84,7 @@ describe("createDataExtensionYaml", () => {
endLine: 26,
endColumn: 68,
},
classification: CallClassification.Source,
},
],
},
@@ -148,6 +155,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
methodName: "createQuery",
methodParameters: "(String)",
supported: true,
supportedType: "sink",
usages: [
{
label: "createQuery(...)",
@@ -158,6 +166,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
endLine: 15,
endColumn: 56,
},
classification: CallClassification.Source,
},
{
label: "createQuery(...)",
@@ -168,6 +177,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
endLine: 26,
endColumn: 39,
},
classification: CallClassification.Source,
},
],
},
@@ -179,6 +189,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
methodName: "executeScalar",
methodParameters: "(Class)",
supported: true,
supportedType: "neutral",
usages: [
{
label: "executeScalar(...)",
@@ -189,6 +200,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
endLine: 15,
endColumn: 85,
},
classification: CallClassification.Source,
},
{
label: "executeScalar(...)",
@@ -199,6 +211,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
endLine: 26,
endColumn: 68,
},
classification: CallClassification.Source,
},
],
},
@@ -210,6 +223,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
methodName: "Sql2o",
methodParameters: "(String,String,String)",
supported: false,
supportedType: "none",
usages: [
{
label: "new Sql2o(...)",
@@ -220,6 +234,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
endLine: 10,
endColumn: 88,
},
classification: CallClassification.Source,
},
],
},
@@ -232,6 +247,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
methodName: "run",
methodParameters: "(Class,String[])",
supported: false,
supportedType: "none",
usages: [
{
label: "run(...)",
@@ -242,6 +258,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
endLine: 9,
endColumn: 66,
},
classification: CallClassification.Source,
},
],
},
@@ -253,6 +270,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
methodName: "println",
methodParameters: "(String)",
supported: true,
supportedType: "summary",
usages: [
{
label: "println(...)",
@@ -263,6 +281,7 @@ describe("createDataExtensionYamlsForApplicationMode", () => {
endLine: 29,
endColumn: 49,
},
classification: CallClassification.Source,
},
],
},
@@ -356,6 +375,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
methodName: "createQuery",
methodParameters: "(String)",
supported: true,
supportedType: "sink",
usages: [
{
label: "createQuery(...)",
@@ -366,6 +386,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
endLine: 15,
endColumn: 56,
},
classification: CallClassification.Source,
},
{
label: "createQuery(...)",
@@ -376,6 +397,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
endLine: 26,
endColumn: 39,
},
classification: CallClassification.Source,
},
],
},
@@ -387,6 +409,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
methodName: "executeScalar",
methodParameters: "(Class)",
supported: true,
supportedType: "neutral",
usages: [
{
label: "executeScalar(...)",
@@ -397,6 +420,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
endLine: 15,
endColumn: 85,
},
classification: CallClassification.Source,
},
{
label: "executeScalar(...)",
@@ -407,6 +431,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
endLine: 26,
endColumn: 68,
},
classification: CallClassification.Source,
},
],
},
@@ -418,6 +443,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
methodName: "Sql2o",
methodParameters: "(String,String,String)",
supported: false,
supportedType: "none",
usages: [
{
label: "new Sql2o(...)",
@@ -428,6 +454,7 @@ describe("createDataExtensionYamlsForFrameworkMode", () => {
endLine: 10,
endColumn: 88,
},
classification: CallClassification.Source,
},
],
},