-
Notifications
You must be signed in to change notification settings - Fork 323
/
tools-features.ts
26 lines (24 loc) · 991 Bytes
/
tools-features.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import type { VersionInfo } from "./codeql";
export enum ToolsFeature {
AnalysisSummaryV2IsDefault = "analysisSummaryV2Default",
BuildModeOption = "buildModeOption",
IndirectTracingSupportsStaticBinaries = "indirectTracingSupportsStaticBinaries",
InformsAboutUnsupportedPathFilters = "informsAboutUnsupportedPathFilters",
SetsCodeqlRunnerEnvVar = "setsCodeqlRunnerEnvVar",
TraceCommandUseBuildMode = "traceCommandUseBuildMode",
SarifMergeRunsFromEqualCategory = "sarifMergeRunsFromEqualCategory",
ForceOverwrite = "forceOverwrite",
}
/**
* Determines if the given feature is supported by the CLI.
*
* @param versionInfo Version information, including features, returned by the CLI.
* @param feature The feature to check for.
* @returns True if the feature is supported or false otherwise.
*/
export function isSupportedToolsFeature(
versionInfo: VersionInfo,
feature: ToolsFeature,
): boolean {
return !!versionInfo.features && versionInfo.features[feature];
}