1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Drop values missing declarations.

This commit is contained in:
Rob Rix 2017-06-05 16:54:32 -04:00
parent 95047d10a2
commit a8538e2287

View File

@ -159,7 +159,8 @@ entrySummary entry = case entry of
Replaced a -> recordSummary a "modified" Replaced a -> recordSummary a "modified"
where recordSummary record = case getDeclaration record of where recordSummary record = case getDeclaration record of
Just (ErrorDeclaration text) -> Just . const (ErrorSummary text (sourceSpan record)) Just (ErrorDeclaration text) -> Just . const (ErrorSummary text (sourceSpan record))
declaration -> Just . JSONSummary (toCategoryName (category record)) (maybe "" declarationIdentifier declaration) (sourceSpan record) Just declaration -> Just . JSONSummary (toCategoryName (category record)) (declarationIdentifier declaration) (sourceSpan record)
Nothing -> const Nothing
renderToC :: (HasField fields Category, HasField fields (Maybe Declaration), HasField fields SourceSpan, Traversable f) => Both SourceBlob -> Diff f (Record fields) -> Summaries renderToC :: (HasField fields Category, HasField fields (Maybe Declaration), HasField fields SourceSpan, Traversable f) => Both SourceBlob -> Diff f (Record fields) -> Summaries
renderToC blobs = uncurry Summaries . bimap toMap toMap . List.partition isValidSummary . diffTOC renderToC blobs = uncurry Summaries . bimap toMap toMap . List.partition isValidSummary . diffTOC