Demo: Use the elm-review-reporter message when there are no errors

This commit is contained in:
Jeroen Engels 2019-09-29 00:15:01 +02:00
parent 8e48d01e66
commit b2e002069f

View File

@ -317,20 +317,12 @@ viewPart { str, color, backgroundColor } =
reviewErrors : Model -> List Reporter.TextContent
reviewErrors model =
if List.isEmpty model.reviewErrors then
[ { str = "I found no linting errors.\nYou're all good!"
, color = Nothing
, backgroundColor = Nothing
}
]
else
Reporter.formatReport Reporter.Reviewing
[ ( file model.sourceCode
, model.reviewErrors
|> List.map fromReviewError
)
]
|> Reporter.formatReport Reporter.Reviewing
fromReviewError : Review.Error -> Reporter.Error