mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-24 02:02:29 +03:00
Demo: Use the elm-review-reporter message when there are no errors
This commit is contained in:
parent
8e48d01e66
commit
b2e002069f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user