Skip to content

Commit b2ea120

Browse files
committed
Remove codeQL.autoDownloadRemoteQueryResults command
1 parent 255f1b6 commit b2ea120

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

extensions/ql-vscode/src/extension.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ import {
103103
import { CodeQlStatusBarHandler } from "./status-bar";
104104

105105
import { RemoteQueriesManager } from "./remote-queries/remote-queries-manager";
106-
import { RemoteQueryResult } from "./remote-queries/remote-query-result";
107106
import { URLSearchParams } from "url";
108107
import {
109108
handleDownloadPacks,
@@ -1190,15 +1189,6 @@ async function activateWithInstalledDistribution(
11901189
),
11911190
);
11921191

1193-
ctx.subscriptions.push(
1194-
commandRunner(
1195-
"codeQL.autoDownloadRemoteQueryResults",
1196-
async (queryResult: RemoteQueryResult, token: CancellationToken) => {
1197-
await rqm.autoDownloadRemoteQueryResults(queryResult, token);
1198-
},
1199-
),
1200-
);
1201-
12021192
ctx.subscriptions.push(
12031193
commandRunner("codeQL.exportSelectedVariantAnalysisResults", async () => {
12041194
await exportSelectedRemoteQueryResults(qhm);

extensions/ql-vscode/src/remote-queries/remote-queries-manager.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CancellationToken, EventEmitter, ExtensionContext } from "vscode";
1+
import { EventEmitter, ExtensionContext } from "vscode";
22
import { join } from "path";
33
import { pathExists, readFile, remove } from "fs-extra";
44

@@ -16,9 +16,6 @@ import { AnalysisResults } from "./shared/analysis-result";
1616
import { App } from "../common/app";
1717
import { redactableError } from "../pure/errors";
1818

19-
const autoDownloadMaxSize = 300 * 1024;
20-
const autoDownloadMaxCount = 100;
21-
2219
const noop = () => {
2320
/* do nothing */
2421
};
@@ -128,29 +125,6 @@ export class RemoteQueriesManager extends DisposableObject {
128125
}
129126
}
130127

131-
public async autoDownloadRemoteQueryResults(
132-
queryResult: RemoteQueryResult,
133-
token: CancellationToken,
134-
): Promise<void> {
135-
const analysesToDownload = queryResult.analysisSummaries
136-
.filter((a) => a.fileSizeInBytes < autoDownloadMaxSize)
137-
.slice(0, autoDownloadMaxCount)
138-
.map((a) => ({
139-
nwo: a.nwo,
140-
databaseSha: a.databaseSha,
141-
resultCount: a.resultCount,
142-
sourceLocationPrefix: a.sourceLocationPrefix,
143-
downloadLink: a.downloadLink,
144-
fileSize: String(a.fileSizeInBytes),
145-
}));
146-
147-
await this.analysesResultsManager.loadAnalysesResults(
148-
analysesToDownload,
149-
token,
150-
(results) => this.view.setAnalysisResults(results, queryResult.queryId),
151-
);
152-
}
153-
154128
public async openResults(query: RemoteQuery, queryResult: RemoteQueryResult) {
155129
await this.view.showResults(query, queryResult);
156130
}

0 commit comments

Comments
 (0)