From 153cab09da93f6b273bb28b5a4ca876a028d2e1e Mon Sep 17 00:00:00 2001 From: Stephan Brandauer Date: Wed, 24 May 2023 12:09:28 +0000 Subject: [PATCH] jsdoc for fixInvalidNotificationsInFile --- src/util.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util.ts b/src/util.ts index 824884336..b8c4a751f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -876,6 +876,16 @@ export function fixInvalidNotifications( return newSarif; } +/** + * Removes duplicates from the sarif file. + * + * When `CODEQL_ACTION_DISABLE_DUPLICATE_LOCATION_FIX` is set to true, this will + * simply rename the input file to the output file. Otherwise, it will parse the + * input file as JSON, remove duplicate locations from the SARIF notification + * objects, and write the result to the output file. + * + * For context, see documentation of: + * `CODEQL_ACTION_DISABLE_DUPLICATE_LOCATION_FIX`. */ export function fixInvalidNotificationsInFile( inputPath: string, outputPath: string,