Skip to content

Commit d94f300

Browse files
authored
refactor: suppress math.random sonar warnings (#1824)
refactor: suppress math.random issues Signed-off-by: Adam Setch <[email protected]>
1 parent a047fa6 commit d94f300

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/renderer/components/AllRead.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const AllRead: FC<IAllRead> = ({ fullHeight = true }: IAllRead) => {
1717
const emoji = useMemo(
1818
() =>
1919
Constants.ALL_READ_EMOJIS[
20+
// NOSONAR: Non-secure PRNG is acceptable here
2021
Math.floor(Math.random() * Constants.ALL_READ_EMOJIS.length)
2122
],
2223
[],

src/renderer/components/Oops.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const Oops: FC<IOops> = ({ error, fullHeight = true }: IOops) => {
1313
const err = error ?? Errors.UNKNOWN;
1414

1515
const emoji = useMemo(
16+
// NOSONAR: Non-secure PRNG is acceptable here
1617
() => err.emojis[Math.floor(Math.random() * err.emojis.length)],
1718
[err],
1819
);

0 commit comments

Comments
 (0)