Move computation of errors

This commit is contained in:
Jeroen Engels 2023-04-01 22:09:44 +02:00
parent a25f56e63c
commit 33b0359aa5

View File

@ -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