Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Henry Mercer <henrymercer@github.com>
  • Loading branch information
nickfyson and henrymercer authored Apr 3, 2024
1 parent 6514cbb commit 4b4826a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/fingerprints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export async function addFingerprints(
sourceRoot: string,
logger: Logger,
): Promise<SarifFile> {
logger.info(`Adding fingerprints to SARIF file`);
logger.info("Adding fingerprints to SARIF file. For more information, see https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs");
// Gather together results for the same file and construct
// callbacks to accept hashes for that file and update the location
const callbacksByFile: { [filename: string]: hashCallback[] } = {};
Expand Down
10 changes: 5 additions & 5 deletions src/upload-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async function combineSarifFilesUsingCLI(
features: Features,
logger: Logger,
): Promise<SarifFile> {
logger.info(`Combining sarif files using CLI`);
logger.info("Combining SARIF files using the CodeQL CLI");
if (sarifFiles.length === 1) {
return JSON.parse(fs.readFileSync(sarifFiles[0], "utf8")) as SarifFile;
}
Expand Down Expand Up @@ -420,7 +420,7 @@ export function buildPayload(
mergeBaseCommitOid: string | undefined,
logger: Logger,
) {
logger.info(`Combining sarif files using CLI`);
logger.info(`Combining SARIF files using CLI`);
const payloadObj = {
commit_oid: commitOid,
ref,
Expand Down Expand Up @@ -514,11 +514,11 @@ async function uploadFiles(

const toolNames = util.getToolNames(sarif);

logger.debug(`Validating unique category in sarif`);
logger.debug(`Validating that each SARIF run has a unique category`);
validateUniqueCategory(sarif);
logger.debug(`Stringifying sarif for upload`);
logger.debug(`Serializing SARIF for upload`);
const sarifPayload = JSON.stringify(sarif);
logger.debug(`Compressing sarif payload`);
logger.debug(`Compressing serialized SARIF`);
const zippedSarif = zlib.gzipSync(sarifPayload).toString("base64");
const checkoutURI = fileUrl(sourceRoot);

Expand Down

0 comments on commit 4b4826a

Please sign in to comment.