Compare commits

...

1 Commits

Author SHA1 Message Date
Stephan Brandauer
5e1b248936 for testing; don't merge this 2023-05-24 14:14:46 +00:00

View File

@@ -891,17 +891,12 @@ export function fixInvalidNotificationsInFile(
outputPath: string, outputPath: string,
logger: Logger logger: Logger
): void { ): void {
if (process.env[CODEQL_ACTION_DISABLE_DUPLICATE_LOCATION_FIX] === "true") { // XXX never merge this
logger.info( logger.info(
"SARIF notification object duplicate location fix disabled by the " + "SARIF notification object duplicate location fix disabled by the " +
`${CODEQL_ACTION_DISABLE_DUPLICATE_LOCATION_FIX} environment variable.` `${CODEQL_ACTION_DISABLE_DUPLICATE_LOCATION_FIX} environment variable.`
); );
fs.renameSync(inputPath, outputPath); fs.renameSync(inputPath, outputPath);
} else {
let sarif = JSON.parse(fs.readFileSync(inputPath, "utf8")) as SarifFile;
sarif = fixInvalidNotifications(sarif, logger);
fs.writeFileSync(outputPath, JSON.stringify(sarif));
}
} }
export function wrapError(error: unknown): Error { export function wrapError(error: unknown): Error {