mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-30 13:32:03 +03:00
Move computation of errors
This commit is contained in:
parent
a25f56e63c
commit
33b0359aa5
@ -5518,14 +5518,14 @@ addDataExtract schema raise cache =
|
||||
Just dataExtractor ->
|
||||
Just
|
||||
(\reviewOptions ->
|
||||
let
|
||||
errors : List (Error {})
|
||||
errors =
|
||||
-- TODO Can we compute this as we traverse the file?
|
||||
-- We can probably store whether each entry has preventable errors, which would not require us to loop over the errors (again)
|
||||
errorsFromCache cache
|
||||
in
|
||||
if reviewOptions.extract then
|
||||
let
|
||||
errors : List (Error {})
|
||||
errors =
|
||||
-- TODO Can we compute this as we traverse the file?
|
||||
-- We can probably store whether each entry has preventable errors, which would not require us to loop over the errors (again)
|
||||
errorsFromCache cache
|
||||
in
|
||||
if not (List.any doesPreventExtract errors) then
|
||||
let
|
||||
inputContext : projectContext
|
||||
|
Loading…
Reference in New Issue
Block a user