clarify logging in response to pr review comments

This commit is contained in:
nickfyson 2024-04-03 21:19:06 +01:00
parent d3c32a84cb
commit c037115ddf
3 changed files with 5 additions and 3 deletions

3
lib/upload-lib.js generated
View file

@ -52,12 +52,13 @@ const GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this r
// Takes a list of paths to sarif files and combines them together,
// returning the contents of the combined sarif file.
function combineSarifFiles(sarifFiles, logger) {
logger.info(`Combining sarif files`);
logger.info(`Loading SARIF file(s)`);
const combinedSarif = {
version: null,
runs: [],
};
for (const sarifFile of sarifFiles) {
logger.debug(`Loading SARIF file: ${sarifFile}`);
const sarifObject = JSON.parse(fs.readFileSync(sarifFile, "utf8"));
// Check SARIF version
if (combinedSarif.version === null) {

File diff suppressed because one or more lines are too long

View file

@ -37,13 +37,14 @@ const GENERIC_404_MSG =
// Takes a list of paths to sarif files and combines them together,
// returning the contents of the combined sarif file.
function combineSarifFiles(sarifFiles: string[], logger: Logger): SarifFile {
logger.info(`Combining sarif files`);
logger.info(`Loading SARIF file(s)`);
const combinedSarif: SarifFile = {
version: null,
runs: [],
};
for (const sarifFile of sarifFiles) {
logger.debug(`Loading SARIF file: ${sarifFile}`);
const sarifObject = JSON.parse(
fs.readFileSync(sarifFile, "utf8"),
) as SarifFile;