Rename function

This commit is contained in:
Jeroen Engels 2023-04-12 19:35:50 +02:00
parent 73b8388d84
commit 93242ae1c3
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
module Review.Cache exposing (EntryNoOutputContext, ModuleEntry, ProjectFileCache, createEntryForProjectFileCache, createModuleEntry, createNoOutput, errors, errorsForMaybeProjectFileCache, errorsFromProjectFileCache, match, matchNoOutput, matchProjectFileCache, outputContext, outputContextForProjectFileCache, outputContextHash, outputContextHashForProjectFileCache, outputForNoOutput, setErrors)
module Review.Cache exposing (EntryNoOutputContext, ModuleEntry, ProjectFileCache, createEntryForProjectFileCache, createModuleEntry, createNoOutput, errors, errorsForMaybeProjectFileCache, errorsFromProjectFileCache, match, matchNoOutput, matchProjectFileCache, outputContext, outputContextForProjectFileCache, outputContextHash, outputContextHashForProjectFileCache, outputForNoOutput, setErrorsForModule)
import Review.Cache.ContentHash as ContentHash exposing (ContentHash)
import Review.Cache.ContextHash as ContextHash exposing (ComparableContextHash, ContextHash)
@ -50,8 +50,8 @@ errors (ModuleEntry entry) =
entry.errors
setErrors : List error -> ModuleEntry error context -> ModuleEntry error context
setErrors newErrors (ModuleEntry entry) =
setErrorsForModule : List error -> ModuleEntry error context -> ModuleEntry error context
setErrorsForModule newErrors (ModuleEntry entry) =
ModuleEntry { entry | errors = newErrors }

View File

@ -5463,7 +5463,7 @@ createRuleProjectVisitor schema initialProject ruleData initialCache =
-- TODO This is called at the wrong moment: This contains the state of the project with fixes that haven't been applied.
, getErrors = \() -> errorsFromCache (finalCacheMarker schema.name hidden.ruleData.ruleId cache)
, setErrorsForModule = \filePath errors -> raiseCache { cache | moduleContexts = Dict.update filePath (Maybe.map (\entry -> Cache.setErrors errors entry)) cache.moduleContexts }
, setErrorsForModule = \filePath errors -> raiseCache { cache | moduleContexts = Dict.update filePath (Maybe.map (\entry -> Cache.setErrorsForModule errors entry)) cache.moduleContexts }
, backToRule =
\() ->
Rule