mirror of
https://github.com/github/codeql-action.git
synced 2026-05-04 12:50:14 +00:00
Check if file is .quality.sarif for CQ upload
This commit is contained in:
Generated
+13
-11
@@ -93466,17 +93466,19 @@ async function uploadSarif(logger, features, sarifPath, pathStats, checkoutPath,
|
||||
core13.setOutput("sarif-id", uploadResult.sarifID);
|
||||
uploadResults["code-scanning" /* CodeScanning */] = uploadResult;
|
||||
}
|
||||
const qualityUploadResult = await findAndUpload(
|
||||
logger,
|
||||
features,
|
||||
sarifPath,
|
||||
pathStats,
|
||||
checkoutPath,
|
||||
CodeQuality,
|
||||
fixCodeQualityCategory(logger, category)
|
||||
);
|
||||
if (qualityUploadResult !== void 0) {
|
||||
uploadResults["code-quality" /* CodeQuality */] = qualityUploadResult;
|
||||
if (pathStats.isDirectory() || pathStats.isFile() && CodeQuality.sarifPredicate(sarifPath)) {
|
||||
const qualityUploadResult = await findAndUpload(
|
||||
logger,
|
||||
features,
|
||||
sarifPath,
|
||||
pathStats,
|
||||
checkoutPath,
|
||||
CodeQuality,
|
||||
fixCodeQualityCategory(logger, category)
|
||||
);
|
||||
if (qualityUploadResult !== void 0) {
|
||||
uploadResults["code-quality" /* CodeQuality */] = qualityUploadResult;
|
||||
}
|
||||
}
|
||||
return uploadResults;
|
||||
}
|
||||
|
||||
+16
-11
@@ -83,17 +83,22 @@ export async function uploadSarif(
|
||||
}
|
||||
|
||||
// If there are `.quality.sarif` files in `sarifPath`, then upload those to the code quality service.
|
||||
const qualityUploadResult = await findAndUpload(
|
||||
logger,
|
||||
features,
|
||||
sarifPath,
|
||||
pathStats,
|
||||
checkoutPath,
|
||||
analyses.CodeQuality,
|
||||
actionsUtil.fixCodeQualityCategory(logger, category),
|
||||
);
|
||||
if (qualityUploadResult !== undefined) {
|
||||
uploadResults[analyses.AnalysisKind.CodeQuality] = qualityUploadResult;
|
||||
if (
|
||||
pathStats.isDirectory() ||
|
||||
(pathStats.isFile() && analyses.CodeQuality.sarifPredicate(sarifPath))
|
||||
) {
|
||||
const qualityUploadResult = await findAndUpload(
|
||||
logger,
|
||||
features,
|
||||
sarifPath,
|
||||
pathStats,
|
||||
checkoutPath,
|
||||
analyses.CodeQuality,
|
||||
actionsUtil.fixCodeQualityCategory(logger, category),
|
||||
);
|
||||
if (qualityUploadResult !== undefined) {
|
||||
uploadResults[analyses.AnalysisKind.CodeQuality] = qualityUploadResult;
|
||||
}
|
||||
}
|
||||
|
||||
return uploadResults;
|
||||
|
||||
Reference in New Issue
Block a user