From 8a6676b868be5e86d3281a9f1a26fd23d2b3acc4 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 25 Jun 2021 10:22:42 +0530 Subject: [PATCH] toggele analysis count update --- .../static-analyser/src/lib/remix-ui-static-analyser.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 0659d72f83..c7c1e6f2e9 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -133,13 +133,17 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { } const showWarningsByModule = (showOnlyModule: string) => { + let count = 0 if(allWarnings[showOnlyModule]) { const newWarningState = {} newWarningState[showOnlyModule] = allWarnings[showOnlyModule] setWarningState({[showOnlyModule]: allWarnings[showOnlyModule]}) + count = allWarnings[showOnlyModule].length } else if (showOnlyModule === 'all') { setWarningState(allWarnings) + for (const e in allWarnings) count += allWarnings[e].length } + props.event.trigger('staticAnaysisWarning', [count]) } const run = (lastCompilationResult, lastCompilationSource, currentFile) => {