mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
clarify logging in response to pr review comments
This commit is contained in:
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;
|
||||
|
||||
Reference in New Issue
Block a user