From cb385a2a9c1ea51edffed7eb743de495bbb6c372 Mon Sep 17 00:00:00 2001 From: utsavized Date: Wed, 20 May 2020 11:52:51 -0700 Subject: [PATCH] Calculate total hints. --- src/server/routes/scanner.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/routes/scanner.js b/src/server/routes/scanner.js index 5b7f4c763..5521e2b8a 100644 --- a/src/server/routes/scanner.js +++ b/src/server/routes/scanner.js @@ -109,11 +109,14 @@ const processHintResults = async (scanResult) => { return hint.messages.length === 1 && hint.messages[0].message === 'Error in webhint analyzing this hint'; }); + result.hintsCount = 0; + /* * Formatter always returns hint status equal to `finished` * We need to assign the real status */ hints.forEach((hint) => { + result.hintsCount += hint.messages.length; const resultCategory = result.getCategoryByName(hint.category); let resultHint = resultCategory.getHintByName(hint.name);