Skip to content

Commit a6543cb

Browse files
authored
Add suppression comments (#1845)
1 parent 2bf8458 commit a6543cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/adapter/objectPreview/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,14 +532,14 @@ export function formatAsTable(param: Cdp.Runtime.ObjectPreview): string {
532532

533533
const table: string[] = [];
534534
table.push(
535-
rowTemplate.replace('[', '╭').replace(/\|/g, '┬').replace(']', '╮').replace(/-/g, '┄'),
535+
rowTemplate.replace('[', '╭').replace(/\|/g, '┬').replace(']', '╮').replace(/-/g, '┄'), // CodeQL [SM02383] The non-global replaces are replacing the sides of the table and do not need to be global.
536536
);
537537
const header: string[] = [];
538538
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
539539
for (const name of colNames.values()) header.push(pad(name || '', colLengths.get(name)!));
540540
table.push('┊ ' + header.join(' ┊ ') + ' ┊');
541541
table.push(
542-
rowTemplate.replace('[', '├').replace(/\|/g, '┼').replace(']', '┤').replace(/-/g, '┄'),
542+
rowTemplate.replace('[', '├').replace(/\|/g, '┼').replace(']', '┤').replace(/-/g, '┄'), // CodeQL [SM02383] The non-global replaces are replacing the sides of the table and do not need to be global.
543543
);
544544

545545
for (const value of rows) {
@@ -551,7 +551,7 @@ export function formatAsTable(param: Cdp.Runtime.ObjectPreview): string {
551551
table.push('┊ ' + row.join(' ┊ ') + ' ┊');
552552
}
553553
table.push(
554-
rowTemplate.replace('[', '╰').replace(/\|/g, '┴').replace(']', '╯').replace(/-/g, '┄'),
554+
rowTemplate.replace('[', '╰').replace(/\|/g, '┴').replace(']', '╯').replace(/-/g, '┄'), // CodeQL [SM02383] The non-global replaces are replacing the sides of the table and do not need to be global.
555555
);
556556
return table.map(row => stringUtils.trimEnd(row, maxTableWidth)).join('\n');
557557
}

0 commit comments

Comments
 (0)