From ee3eb518fd01b89ecf623e645ae6923cbfc72c9e 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 e73f7463e7..13162d4a79 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) => {