diff --git a/src/NoUnusedModules.elm b/src/NoUnusedModules.elm index 9f0cf9f0..d130c190 100644 --- a/src/NoUnusedModules.elm +++ b/src/NoUnusedModules.elm @@ -53,7 +53,7 @@ rule = , context = { initGlobalContext = initGlobalContext , initModuleContext = initModuleContext - , toGlobalContext = toGlobalContext + , fromModuleToGlobal = fromModuleToGlobal , fold = fold } , finalEvaluation = finalEvaluationForProject @@ -95,8 +95,8 @@ initModuleContext _ _ _ = } -toGlobalContext : Rule.FileKey -> Node ModuleName -> ModuleContext -> GlobalContext -toGlobalContext fileKey moduleName moduleContext = +fromModuleToGlobal : Rule.FileKey -> Node ModuleName -> ModuleContext -> GlobalContext +fromModuleToGlobal fileKey moduleName moduleContext = { modules = Dict.singleton (Node.value moduleName) diff --git a/src/Review/Rule.elm b/src/Review/Rule.elm index acb41e93..f8e3dd13 100644 --- a/src/Review/Rule.elm +++ b/src/Review/Rule.elm @@ -536,7 +536,7 @@ type MultiSchema globalContext moduleContext , context : { initGlobalContext : globalContext , initModuleContext : FileKey -> Node ModuleName -> globalContext -> moduleContext - , toGlobalContext : FileKey -> Node ModuleName -> moduleContext -> globalContext + , fromModuleToGlobal : FileKey -> Node ModuleName -> moduleContext -> globalContext , fold : globalContext -> globalContext -> globalContext } , elmJsonVisitors : List (Maybe Elm.Project.Project -> globalContext -> globalContext) @@ -555,7 +555,7 @@ newMultiSchema : , context : { initGlobalContext : globalContext , initModuleContext : FileKey -> Node ModuleName -> globalContext -> moduleContext - , toGlobalContext : FileKey -> Node ModuleName -> moduleContext -> globalContext + , fromModuleToGlobal : FileKey -> Node ModuleName -> moduleContext -> globalContext , fold : globalContext -> globalContext -> globalContext } , finalEvaluation : globalContext -> List Error @@ -660,7 +660,7 @@ runMulti (MultiSchema schema) startCache project = { source = file.source , errors = List.map (\(Error err) -> Error { err | filePath = file.path }) fileErrors , context = - schema.context.toGlobalContext + schema.context.fromModuleToGlobal fileKey moduleNameNode_ context