Remove language-specific baseline configuration flag
This commit is contained in:
parent
07d42ec34e
commit
270788d6fd
6 changed files with 18 additions and 27 deletions
8
lib/codeql.js
generated
8
lib/codeql.js
generated
|
|
@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0;
|
exports.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0;
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
|
|
@ -108,6 +108,10 @@ exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = "2.13.1";
|
||||||
* Versions 2.13.4+ of the CodeQL CLI support the `resolve build-environment` command.
|
* Versions 2.13.4+ of the CodeQL CLI support the `resolve build-environment` command.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
||||||
|
/**
|
||||||
|
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
||||||
|
*/
|
||||||
|
exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
|
||||||
/**
|
/**
|
||||||
* Set up CodeQL CLI access.
|
* Set up CodeQL CLI access.
|
||||||
*
|
*
|
||||||
|
|
@ -278,7 +282,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
(await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_INIT_WITH_QLCONFIG))) {
|
(await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_INIT_WITH_QLCONFIG))) {
|
||||||
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
|
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
|
||||||
}
|
}
|
||||||
if (await features.getValue(feature_flags_1.Feature.LanguageBaselineConfigEnabled, this)) {
|
if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG)) {
|
||||||
extraArgs.push("--calculate-language-specific-baseline");
|
extraArgs.push("--calculate-language-specific-baseline");
|
||||||
}
|
}
|
||||||
await runTool(cmd, [
|
await runTool(cmd, [
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
12
lib/feature-flags.js
generated
12
lib/feature-flags.js
generated
|
|
@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const semver = __importStar(require("semver"));
|
const semver = __importStar(require("semver"));
|
||||||
|
|
@ -44,10 +44,6 @@ exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0";
|
||||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options.
|
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
||||||
/**
|
|
||||||
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
|
||||||
*/
|
|
||||||
exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
|
|
||||||
/**
|
/**
|
||||||
* Feature enablement as returned by the GitHub API endpoint.
|
* Feature enablement as returned by the GitHub API endpoint.
|
||||||
*
|
*
|
||||||
|
|
@ -62,7 +58,6 @@ var Feature;
|
||||||
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
||||||
Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled";
|
Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled";
|
||||||
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
||||||
Feature["LanguageBaselineConfigEnabled"] = "language_baseline_config_enabled";
|
|
||||||
Feature["MlPoweredQueriesEnabled"] = "ml_powered_queries_enabled";
|
Feature["MlPoweredQueriesEnabled"] = "ml_powered_queries_enabled";
|
||||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||||
Feature["ScalingReservedRamEnabled"] = "scaling_reserved_ram_enabled";
|
Feature["ScalingReservedRamEnabled"] = "scaling_reserved_ram_enabled";
|
||||||
|
|
@ -99,11 +94,6 @@ exports.featureConfig = {
|
||||||
minimumVersion: "2.12.4",
|
minimumVersion: "2.12.4",
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
},
|
},
|
||||||
[Feature.LanguageBaselineConfigEnabled]: {
|
|
||||||
envVar: "CODEQL_ACTION_LANGUAGE_BASELINE_CONFIG",
|
|
||||||
minimumVersion: exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG,
|
|
||||||
defaultValue: false,
|
|
||||||
},
|
|
||||||
[Feature.MlPoweredQueriesEnabled]: {
|
[Feature.MlPoweredQueriesEnabled]: {
|
||||||
envVar: "CODEQL_ML_POWERED_QUERIES",
|
envVar: "CODEQL_ML_POWERED_QUERIES",
|
||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -325,6 +325,11 @@ export const CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = "2.13.1";
|
||||||
*/
|
*/
|
||||||
export const CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
export const CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
||||||
|
*/
|
||||||
|
export const CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up CodeQL CLI access.
|
* Set up CodeQL CLI access.
|
||||||
*
|
*
|
||||||
|
|
@ -576,7 +581,10 @@ export async function getCodeQLForCmd(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
await features.getValue(Feature.LanguageBaselineConfigEnabled, this)
|
await util.codeQlVersionAbove(
|
||||||
|
this,
|
||||||
|
CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG,
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
extraArgs.push("--calculate-language-specific-baseline");
|
extraArgs.push("--calculate-language-specific-baseline");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,6 @@ export const CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0";
|
||||||
*/
|
*/
|
||||||
export const CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
export const CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
||||||
|
|
||||||
/**
|
|
||||||
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
|
||||||
*/
|
|
||||||
export const CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
|
|
||||||
|
|
||||||
export interface CodeQLDefaultVersionInfo {
|
export interface CodeQLDefaultVersionInfo {
|
||||||
cliVersion: string;
|
cliVersion: string;
|
||||||
tagName: string;
|
tagName: string;
|
||||||
|
|
@ -60,7 +55,6 @@ export enum Feature {
|
||||||
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
|
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
|
||||||
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
|
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
|
||||||
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
|
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
|
||||||
LanguageBaselineConfigEnabled = "language_baseline_config_enabled",
|
|
||||||
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
|
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
|
||||||
QaTelemetryEnabled = "qa_telemetry_enabled",
|
QaTelemetryEnabled = "qa_telemetry_enabled",
|
||||||
ScalingReservedRamEnabled = "scaling_reserved_ram_enabled",
|
ScalingReservedRamEnabled = "scaling_reserved_ram_enabled",
|
||||||
|
|
@ -101,11 +95,6 @@ export const featureConfig: Record<
|
||||||
minimumVersion: "2.12.4",
|
minimumVersion: "2.12.4",
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
},
|
},
|
||||||
[Feature.LanguageBaselineConfigEnabled]: {
|
|
||||||
envVar: "CODEQL_ACTION_LANGUAGE_BASELINE_CONFIG",
|
|
||||||
minimumVersion: CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG,
|
|
||||||
defaultValue: false,
|
|
||||||
},
|
|
||||||
[Feature.MlPoweredQueriesEnabled]: {
|
[Feature.MlPoweredQueriesEnabled]: {
|
||||||
envVar: "CODEQL_ML_POWERED_QUERIES",
|
envVar: "CODEQL_ML_POWERED_QUERIES",
|
||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue