1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 04:10:29 +03:00

Use diffWith for legacy summaries.

This commit is contained in:
Rob Rix 2019-10-02 13:25:42 -04:00
parent 2be893baf0
commit dd01c89463
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -23,7 +23,7 @@ legacyDiffSummary :: DiffEffects sig m => [BlobPair] -> m Summaries
legacyDiffSummary = distributeFoldMap go
where
go :: DiffEffects sig m => BlobPair -> m Summaries
go blobPair = doDiff legacyDecorateTerm (pure . legacySummarizeDiff blobPair) blobPair
go blobPair = diffWith legacySummarizeDiffParsers legacyDecorateTerm (pure . legacySummarizeDiff blobPair) blobPair
`catchError` \(SomeException e) ->
pure $ Summaries mempty (Map.singleton path [toJSON (ErrorSummary (T.pack (show e)) lowerBound lang)])
where path = T.pack $ pathKeyForBlobPair blobPair