mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
Don’t colourize the whole expectation.
This commit is contained in:
parent
d9a490381b
commit
e74c98f9cc
@ -35,7 +35,7 @@ formatError :: IncludeSource -> Colourize -> Blob -> Error String -> String
|
||||
formatError includeSource colourize Blob{..} Error{..}
|
||||
= ($ "")
|
||||
$ withSGRCode colourize [SetConsoleIntensity BoldIntensity] (showSpan (maybe Nothing (const (Just blobPath)) blobKind) errorSpan . showString ": ")
|
||||
. withSGRCode colourize [SetColor Foreground Vivid Red] (showString "error" . showString ": " . showExpectation errorExpected errorActual . showChar '\n')
|
||||
. withSGRCode colourize [SetColor Foreground Vivid Red] (showString "error") . showString ": " . showExpectation errorExpected errorActual . showChar '\n'
|
||||
. (if includeSource
|
||||
then showString (unpack context) . (if "\n" `isSuffixOf` context then id else showChar '\n')
|
||||
. showString (replicate (succ (posColumn (spanStart errorSpan) + lineNumberDigits)) ' ') . withSGRCode colourize [SetColor Foreground Vivid Green] (showChar '^' . showChar '\n')
|
||||
|
Loading…
Reference in New Issue
Block a user