mirror of
https://github.com/github/codeql-action.git
synced 2025-12-23 15:50:11 +08:00
Disable combining runs within a single file
This commit is contained in:
5
lib/upload-lib.js
generated
5
lib/upload-lib.js
generated
@@ -181,9 +181,6 @@ async function shouldDisableCombineSarifFiles(sarifObjects, features, githubVers
|
||||
// Returns the contents of the combined sarif file.
|
||||
async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) {
|
||||
logger.info("Combining SARIF files using the CodeQL CLI");
|
||||
if (sarifFiles.length === 1) {
|
||||
return JSON.parse(fs.readFileSync(sarifFiles[0], "utf8"));
|
||||
}
|
||||
const sarifObjects = sarifFiles.map((sarifFile) => {
|
||||
return JSON.parse(fs.readFileSync(sarifFile, "utf8"));
|
||||
});
|
||||
@@ -490,6 +487,8 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
|
||||
const sarifPath = sarifPaths[0];
|
||||
sarif = readSarifFile(sarifPath);
|
||||
validateSarifFileSchema(sarif, sarifPath, logger);
|
||||
// Validate that there are no runs for the same category
|
||||
await throwIfCombineSarifFilesDisabled([sarif], features, gitHubVersion);
|
||||
}
|
||||
sarif = filterAlertsByDiffRange(logger, sarif);
|
||||
sarif = await fingerprints.addFingerprints(sarif, checkoutPath, logger);
|
||||
|
||||
Reference in New Issue
Block a user