Skip to content

Commit 5acd163

Browse files
committed
Pattern match acc
1 parent 708a961 commit 5acd163

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/App/Fossa/Ficus/Analyze.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,21 +316,20 @@ runFicus maybeDebugDir ficusConfig = do
316316
)
317317
.| CCL.mapMaybe decodeStrictText
318318
.| CC.foldM
319-
( \acc message -> do
319+
( \(currentSnippetResults, currentVendoredDeps) message -> do
320320
-- Log messages as they come, with timestamps
321321
timestamp <- currentTimeStamp
322322
case message of
323323
FicusMessageError err -> do
324324
hPutStrLn stderr $ "[" ++ timestamp ++ "] ERROR " <> toString (displayFicusError err)
325-
pure acc
325+
pure (currentSnippetResults, currentVendoredDeps)
326326
FicusMessageDebug dbg -> do
327327
hPutStrLn stderr $ "[" ++ timestamp ++ "] DEBUG " <> toString (displayFicusDebug dbg)
328-
pure acc
328+
pure (currentSnippetResults, currentVendoredDeps)
329329
FicusMessageFinding finding -> do
330330
hPutStrLn stderr $ "[" ++ timestamp ++ "] FINDING " <> toString (displayFicusFinding finding)
331331
let analysisFinding = findingToSnippetScanResult finding
332332
let vendoredDep = findingToVendoredDependency finding
333-
let (currentSnippetResults, currentVendoredDeps) = acc
334333
when (isJust currentSnippetResults && isJust analysisFinding) $
335334
hPutStrLn stderr $
336335
"[" ++ timestamp ++ "] ERROR " <> "Found multiple ficus analysis responses."

0 commit comments

Comments
 (0)