Remove unused properties from VersionOutput

This commit is contained in:
Michael B. Gale 2023-10-04 15:51:26 +01:00
parent bb67eddd77
commit 49b94f1a2d
No known key found for this signature in database
GPG key ID: FF5E2765BD00628F
6 changed files with 2 additions and 42 deletions

8
lib/codeql.js generated
View file

@ -184,14 +184,6 @@ function setCodeQL(partialCodeql) {
cachedCodeQL = {
getPath: resolveFunction(partialCodeql, "getPath", () => "/tmp/dummy-path"),
getVersion: resolveFunction(partialCodeql, "getVersion", () => new Promise((resolve) => resolve({
productName: "CodeQL",
vendor: "GitHub",
sha: "",
branches: [],
copyright: "",
unpackedLocation: "",
configFileLocation: "",
configFileFound: false,
version: "1.0.0",
}))),
printVersion: resolveFunction(partialCodeql, "printVersion"),

File diff suppressed because one or more lines are too long

8
lib/testing-utils.js generated
View file

@ -191,14 +191,6 @@ exports.mockLanguagesInRepo = mockLanguagesInRepo;
* Constructs a `VersionOutput` object for testing purposes only.
*/
const makeVersionOutput = (version) => ({
productName: "CodeQL",
vendor: "GitHub",
sha: "",
branches: [],
copyright: "",
unpackedLocation: "",
configFileLocation: "",
configFileFound: false,
version,
});
exports.makeVersionOutput = makeVersionOutput;

File diff suppressed because one or more lines are too long

View file

@ -213,15 +213,7 @@ export interface CodeQL {
}
export interface VersionOutput {
productName: string;
vendor: string;
version: string;
sha: string;
branches: string[];
copyright: string;
unpackedLocation: string;
configFileLocation: string;
configFileFound: boolean;
features?: { [name: string]: boolean };
}
@ -458,14 +450,6 @@ export function setCodeQL(partialCodeql: Partial<CodeQL>): CodeQL {
() =>
new Promise((resolve) =>
resolve({
productName: "CodeQL",
vendor: "GitHub",
sha: "",
branches: [],
copyright: "",
unpackedLocation: "",
configFileLocation: "",
configFileFound: false,
version: "1.0.0",
}),
),

View file

@ -212,14 +212,6 @@ export function mockLanguagesInRepo(languages: string[]) {
* Constructs a `VersionOutput` object for testing purposes only.
*/
export const makeVersionOutput = (version: string): CodeQL.VersionOutput => ({
productName: "CodeQL",
vendor: "GitHub",
sha: "",
branches: [],
copyright: "",
unpackedLocation: "",
configFileLocation: "",
configFileFound: false,
version,
});