mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Output file path as summary key
This commit is contained in:
parent
ae0f18593b
commit
7a9f0b7786
@ -8,7 +8,9 @@ import Range
|
||||
import DiffSummary
|
||||
import Source
|
||||
import Data.Aeson
|
||||
import Data.Functor.Both (runBothWith)
|
||||
|
||||
summary :: (HasField fields Category, HasField fields Range) => Renderer (Record fields)
|
||||
summary blobs diff = SummaryOutput $ "summaries" .= (summaries >>= annotatedSummaries)
|
||||
where summaries = diffSummaries (source <$> blobs) diff
|
||||
summary blobs diff = SummaryOutput $ (runBothWith toSummaryKey (path <$> blobs)) .= (summaries >>= annotatedSummaries)
|
||||
where summaries = diffSummaries (source <$> blobs) diff
|
||||
toSummaryKey before after = toS $ if before == after then after else before <> " -> " <> after
|
Loading…
Reference in New Issue
Block a user