File tree Expand file tree Collapse file tree 2 files changed +10
-22
lines changed
test/vscode-tests/cli-integration Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -357,24 +357,6 @@ export async function prepareCodeTour(
357357 * The following functions al heuristically determine metadata about databases.
358358 */
359359
360- /**
361- * Note that this heuristic is only being used for backwards compatibility with
362- * CLI versions before the langauge name was introduced to dbInfo. Features
363- * that do not require backwards compatibility should call
364- * `cli.CodeQLCliServer.resolveDatabase` and use the first entry in the
365- * `languages` property.
366- *
367- * @see cli.CodeQLCliServer.resolveDatabase
368- */
369-
370- export const languageToDbScheme = Object . entries ( dbSchemeToLanguage ) . reduce (
371- ( acc , [ k , v ] ) => {
372- acc [ v ] = k ;
373- return acc ;
374- } ,
375- { } as { [ k : string ] : string } ,
376- ) ;
377-
378360/**
379361 * Returns the initial contents for an empty query, based on the language of the selected
380362 * databse.
Original file line number Diff line number Diff line change @@ -7,15 +7,13 @@ import {
77 QueryInfoByLanguage ,
88} from "../../../src/codeql-cli/cli" ;
99import { itWithCodeQL } from "../cli" ;
10- import {
11- getOnDiskWorkspaceFolders ,
12- languageToDbScheme ,
13- } from "../../../src/helpers" ;
10+ import { getOnDiskWorkspaceFolders } from "../../../src/helpers" ;
1411import { KeyType , resolveQueries } from "../../../src/language-support" ;
1512import { faker } from "@faker-js/faker" ;
1613import { getActivatedExtension } from "../global.helper" ;
1714import { BaseLogger } from "../../../src/common" ;
1815import { getQlPackForDbscheme } from "../../../src/databases/qlpack" ;
16+ import { dbSchemeToLanguage } from "../../../src/common/query-language" ;
1917
2018/**
2119 * Perform proper integration tests by running the CLI
@@ -26,6 +24,14 @@ describe("Use cli", () => {
2624
2725 let logSpy : jest . SpiedFunction < BaseLogger [ "log" ] > ;
2826
27+ const languageToDbScheme = Object . entries ( dbSchemeToLanguage ) . reduce (
28+ ( acc , [ k , v ] ) => {
29+ acc [ v ] = k ;
30+ return acc ;
31+ } ,
32+ { } as { [ k : string ] : string } ,
33+ ) ;
34+
2935 beforeEach ( async ( ) => {
3036 const extension = await getActivatedExtension ( ) ;
3137 cli = extension . cliServer ;
You can’t perform that action at this time.
0 commit comments