refactor cli

This commit is contained in:
Michael Hohn
2025-03-15 17:24:46 -07:00
parent 9a6aa52a40
commit e44024763d

View File

@@ -38,29 +38,52 @@ import type { CliFeatures, VersionAndFeatures } from "./cli-version";
import { ExitCodeError, getCliError } from "./cli-errors"; import { ExitCodeError, getCliError } from "./cli-errors";
import { UserCancellationException } from "../common/vscode/progress"; import { UserCancellationException } from "../common/vscode/progress";
/** // /**
* The version of the SARIF format that we are using. // * The version of the SARIF format that we are using.
*/ // */
const SARIF_FORMAT = "sarifv2.1.0"; // const SARIF_FORMAT = "sarifv2.1.0";
/** // /**
* The string used to specify CSV format. // * The string used to specify CSV format.
*/ // */
// const CSV_FORMAT = "csv";
// /**
// * The expected output of `codeql resolve queries --format bylanguage`.
// */
// export interface QueryInfoByLanguage {
// // Using `unknown` as a placeholder. For now, the value is only ever an empty object.
// byLanguage: Record<string, Record<string, unknown>>;
// noDeclaredLanguage: Record<string, unknown>;
// multipleDeclaredLanguages: Record<string, unknown>;
// }
// /**
// * The expected output of `codeql resolve database`.
// */
// export interface DbInfo {
// sourceLocationPrefix: string;
// columnKind: string;
// unicodeNewlines: boolean;
// sourceArchiveZip: string;
// sourceArchiveRoot: string;
// datasetFolder: string;
// logsFolder: string;
// languages: string[];
// }
// /**
// * The expected output of `codeql resolve upgrades`.
// */
// interface UpgradesInfo {
// scripts: string[];
// finalDbscheme: string;
// matchesTarget?: boolean;
// }
const SARIF_FORMAT = "sarifv2.1.0";
const CSV_FORMAT = "csv"; const CSV_FORMAT = "csv";
/**
* The expected output of `codeql resolve queries --format bylanguage`.
*/
export interface QueryInfoByLanguage {
// Using `unknown` as a placeholder. For now, the value is only ever an empty object.
byLanguage: Record<string, Record<string, unknown>>;
noDeclaredLanguage: Record<string, unknown>;
multipleDeclaredLanguages: Record<string, unknown>;
}
/**
* The expected output of `codeql resolve database`.
*/
export interface DbInfo { export interface DbInfo {
sourceLocationPrefix: string; sourceLocationPrefix: string;
columnKind: string; columnKind: string;
@@ -72,14 +95,7 @@ export interface DbInfo {
languages: string[]; languages: string[];
} }
/** export type QueryInfoByLanguage = Record<string, never>; // If it's always empty
* The expected output of `codeql resolve upgrades`.
*/
interface UpgradesInfo {
scripts: string[];
finalDbscheme: string;
matchesTarget?: boolean;
}
/** /**
* The expected output of `codeql resolve qlpacks`. * The expected output of `codeql resolve qlpacks`.