Remove codeQL.autoDownloadRemoteQueryResults command

This commit is contained in:
Koen Vlaswinkel
2023-02-13 14:32:50 +01:00
parent 255f1b6a5d
commit b2ea12023c
2 changed files with 1 additions and 37 deletions

View File

@@ -103,7 +103,6 @@ import {
import { CodeQlStatusBarHandler } from "./status-bar";
import { RemoteQueriesManager } from "./remote-queries/remote-queries-manager";
import { RemoteQueryResult } from "./remote-queries/remote-query-result";
import { URLSearchParams } from "url";
import {
handleDownloadPacks,
@@ -1190,15 +1189,6 @@ async function activateWithInstalledDistribution(
),
);
ctx.subscriptions.push(
commandRunner(
"codeQL.autoDownloadRemoteQueryResults",
async (queryResult: RemoteQueryResult, token: CancellationToken) => {
await rqm.autoDownloadRemoteQueryResults(queryResult, token);
},
),
);
ctx.subscriptions.push(
commandRunner("codeQL.exportSelectedVariantAnalysisResults", async () => {
await exportSelectedRemoteQueryResults(qhm);

View File

@@ -1,4 +1,4 @@
import { CancellationToken, EventEmitter, ExtensionContext } from "vscode";
import { EventEmitter, ExtensionContext } from "vscode";
import { join } from "path";
import { pathExists, readFile, remove } from "fs-extra";
@@ -16,9 +16,6 @@ import { AnalysisResults } from "./shared/analysis-result";
import { App } from "../common/app";
import { redactableError } from "../pure/errors";
const autoDownloadMaxSize = 300 * 1024;
const autoDownloadMaxCount = 100;
const noop = () => {
/* do nothing */
};
@@ -128,29 +125,6 @@ export class RemoteQueriesManager extends DisposableObject {
}
}
public async autoDownloadRemoteQueryResults(
queryResult: RemoteQueryResult,
token: CancellationToken,
): Promise<void> {
const analysesToDownload = queryResult.analysisSummaries
.filter((a) => a.fileSizeInBytes < autoDownloadMaxSize)
.slice(0, autoDownloadMaxCount)
.map((a) => ({
nwo: a.nwo,
databaseSha: a.databaseSha,
resultCount: a.resultCount,
sourceLocationPrefix: a.sourceLocationPrefix,
downloadLink: a.downloadLink,
fileSize: String(a.fileSizeInBytes),
}));
await this.analysesResultsManager.loadAnalysesResults(
analysesToDownload,
token,
(results) => this.view.setAnalysisResults(results, queryResult.queryId),
);
}
public async openResults(query: RemoteQuery, queryResult: RemoteQueryResult) {
await this.view.showResults(query, queryResult);
}