Clarify name of function

This commit is contained in:
Koen Vlaswinkel
2024-05-02 10:01:11 +02:00
parent 757fcd3d21
commit 1de9b371a1
3 changed files with 7 additions and 7 deletions

6
lib/upload-lib.js generated
View File

@@ -110,7 +110,7 @@ function areAllRunsUnique(sarifObjects) {
}
return true;
}
async function showCombineSarifFilesDeprecationWarning(sarifObjects, features, githubVersion) {
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, githubVersion) {
if (!(await features.getValue(feature_flags_1.Feature.CombineSarifFilesDeprecationWarning))) {
return false;
}
@@ -141,7 +141,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-deprecation-notice";
if (!areAllRunsProducedByCodeQL(sarifObjects)) {
logger.debug("Not all SARIF files were produced by CodeQL. Merging files in the action.");
if (await showCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
logger.warning(`Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`);
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
}
@@ -172,7 +172,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
}
if (!(await codeQL.supportsFeature(tools_features_1.ToolsFeature.SarifMergeRunsFromEqualCategory))) {
logger.warning("The CodeQL CLI does not support merging SARIF files. Merging files in the action.");
if (await showCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, features, gitHubVersion)) {
logger.warning(`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage}. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`);
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
}