clarify logging in response to pr review comments
This commit is contained in:
parent
d3c32a84cb
commit
c037115ddf
3 changed files with 5 additions and 3 deletions
3
lib/upload-lib.js
generated
3
lib/upload-lib.js
generated
|
|
@ -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
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue